命名空间 :UnityEngine.EventSystems
官方描述:
public bool
IsPointerOverGameObject();
public bool
IsPointerOverGameObject(int pointerId); //触摸屏时需要的参数,即检测触碰的手值
Is the pointer with the given ID over an EventSystem object?
代码:
using UnityEngine; using System.Collections; using UnityEngine.EventSystems; //备上空间名
public class MouseExample : Mono