[转]如何处理UI对象和场景对象点击事件冲突/重复
It's kind of annoying how clicks on UI elements interact with the game world right? And the documentation is kind of sketchy on how to fix this.
Here are three sure fire ways to block clicks on UI elements. I recommend watching the whole video, and choosing the one that suits your project best.
Video URL: https://www.youtube.com/watch?v=EVZiv7DLU6E
和尚注:
方法一:
EventSystem.current.IsPointerOverGameObject()
方法二:
Event Trigger
方法三:
Event System Interfaces