Tasharen Entertainment Forum
Support => NGUI 3 Support => Topic started by: Multiplayer on May 26, 2013, 05:31:51 AM
-
Hi
I would like to use the UIButtonKeys script to navigate my menus via keyboard. So far this is working great, but I only want to use the arrow keys for navigation. All other keys, including WASD and TAB, should be free to be used as input for custom player controls.
Is there a way to have the UIButtonKeys script react to the arrow keys only?
Edit:
I found out I can overwrite the behavior of which inputs are able to trigger anything in the UICamera Script. I don't really like to mess with external scripts that way, so a simpler solution will still be appreciated. But it seems this will work for now.
-
Yeah in your case modifying the UICamera is the way to go. Another alternative is to do it yourself in Update() using Input.GetKeyDown() after checking UICamera.selectedObject == gameObject.