using UnityEngine.EventSystems;
void Update () {
if (EventSystem.current.IsPointerOverGameObject())
Debug.Log("当前触摸在UI上");
else
Debug.Log("当前没有触摸在UI上");
}
using UnityEngine.EventSystems;
void Update () {
if (EventSystem.current.IsPointerOverGameObject())
Debug.Log("当前触摸在UI上");
else
Debug.Log("当前没有触摸在UI上");
}