UGUI中UI穿透问题

在场景中有时候一些3D物体在UI元素下面,在点击UI的时候同时点击到3D物体,在UGUI中给了一个方法EventSystem.current.IsPointerOverGameObject(),该方法能够判断点击是不是在UI元素上code private void Update() { if (Input.GetMouseButtonDown(0) && !EventSystem.
相关文章
相关标签/搜索