[转]如何处理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

posted @ 2015-11-19 12:47  O和尚O  阅读(268)  评论(0编辑  收藏  举报