






















#if IPHONE || ANDROID if (EventSystem.current.IsPointerOverGameObject(Input.GetTouch(0).fingerId)) #else if (EventSystem.current.IsPointerOverGameObject()) #endif Debug.Log("当前触摸在UI上"); else Debug.Log("当前没有触摸在UI上");
注意EventSystem.current.IsPointerOverGameObject是指点击的物体是否是一个能响应EventSystem的物体(也就是UGUI控件)
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。