检测鼠标是否在UI上unity

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

posted @   mc宇少  阅读(1049)  评论(0编辑  收藏  举报
努力加载评论中...
点击右上角即可分享
微信分享提示