检测鼠标是否在UI上unity

public static bool IsCursorOnUI(int inputID=-1){
EventSystem eventSystem = EventSystem.current;
return ( eventSystem.IsPointerOverGameObject( inputID ) );
}

posted @ 2018-11-10 20:58  mc宇少  阅读(1049)  评论(0编辑  收藏  举报