EventTrigger on Mobile
This problem only happen when it is tested on mobile phone. I have one button, and I want that button to toggle a value. say, player.setActive(bool);
[Goals]
When it is clicked, player.setActive(true);
When it is unclicked/pointerup -> player.setActive(false)
When the finger highlight the button by dragging the finger into the button -> player.setActive(true)
When the finger leave state 3 by dragging the finger out of the button -> player.setActive(false)
When the finger leave state 3 by releasing the finger off the screen -> player.setActive(false)
[What I did]
I added Event trigger to that button and added:
Pointer Down -> player.setActive(true)
Pointer Up -> player.setActive(false)
Pointer Enter -> player.setActive(true)
Pointer Exit -> player.setActive(false)
[Question] Goal 1-4 can work fine, however in (goal 5) player.setActive(false) is not called when the finger is released from the screen. I think, Pointer up will not be called, unless Pointer Down is called. How can you manage this kind of event?