Tasharen Entertainment Forum
Support => NGUI 3 Support => Topic started by: Santos on December 11, 2014, 06:09:13 PM
-
I want to listen to hover event on touch displays, and the original implementation does not dispatch if the "mouse" is down.
I found this post:
http://www.tasharen.com/forum/index.php?topic=5846.msg27678#msg27678
However, I was wondering if an official solution was created for this. As there are a lot of people working on the same project I'd prefer a solution that doesn't require me to change NGUI source code.
Thanks!
-
That post is too old.
You don't get OnHover on touch devices, but you get OnDragOver / OnDragOut. Listen for those.
-
I've done some tests with OnDragOver and checked the code, it seems like it will only dispatch if an object was "pressed".
If I put my finger on a empty spot and move it over an object it wont dispatch the OnDragOver, is this correct?
-
No, it will work regardless. There is always something underneath the touch, even if it's just an auto-set fallback object (the camera).
Assuming your NGUI is up to date, that is.