Hi Guys!
I´m working on a project using joystick plus mouse/keyboard on screens navigations. I know NGUI is not designed to word simultaneously with this devices, but:
Our screens have a lot of transitions, screens overlaping each other, animations, and button states (over, pressed). And, need to work simultaneously with both devices (joystick + mouse/keyboard).
Do this thing have been very tricky.
My problem number 1:
Some times simply set programmatically the hoveredObject and controllerNavigationObject does not work, and ngui loses focus. So, i have been trying to wait a frame or wait tweens until it finishes, to set the focus of the navigation on screen. Sometimes i even set selectedobject to be sure it works.
My problem number 2:
Obviously, before all of this, sometimes ngui loses focus.
On update 3.9.0 i remember of this:
- NEW: NGUI now automatically finds and focuses on an appropriate UIKeyNavigation object if none has focus while receiving controller-based input.
I think this "automatically way of find and focuses" can be disturbing my "precise control of focus".
So, i ask:
There is a best practice for work on hoveredObject and controllerNavigationObject on NGUI?
I´m trying to precisely control focus between screens on my project. Is that right?
What i´m doing wrong when a set controllerNavigationObject and hoveredObject?
Some times i try to save localy the reference of UICamera.controllerNavigationObject. So, when I come back to the last screen, I set it back and keep my navigation on. But, half the time the reference is not exactly what i was expecting. And navigation breaks. I know UICamera has your own update and inside a frame is a lot of things happening. Is that the right way to do this or i need to not trust on UICamera state? (or) Is a better approach make each screen save your proper focus independently?
Thank you in advenced.