I see from tutorial movie the button in new GUI have only onClick .
not sure are there any way I can detect mousePress/Up/Enter/Exist events like in other tools such as Flash?
You can add an EventTrigger Component to the button to get all Events.
1 Like
Or, you can write your own MonoBehaviour that implements IPointerEnter, IPointerExit, etc, to just intercept the specific events that you care about, then expose your own UnityEvent-derived fields to wire up where they’re sent. This is essentially what EventTrigger does, but EventTrigger is heavyweight as it implements all the interfaces rather than just the ones you care about.
2 Likes
Thank you all for great answers.