前提是UI组件上要有BoxCollider,其次用下面两个字段来判断是否点击UI。
UICamera.isOverUI
Whether the last raycast was over the UI.
最后一次光线投射是否在UI上。
UICamera.uiHasFocus
Much like 'isOverUI', but also returns 'true' if there is currently an active mouse press on a UI element, or if a UI input has focus.
Comments NOTHING