Hi, I am trying to make a menu for my game using the new Unity UI system implemented in version 4.6. I want this to work with both mouse and keyboard but I don’t know enough about the ui system yet to understand how to do this.
What I am trying to do is when you press the up or down key you will select the different buttons in the menu and when pressing enter or space it will “click” that button. Is this something that can be done without too much fiddling.
Check the EventSystem that was created along with your canvas, you can drag a button on “First selected” to make sure you won’t have to click with the mouse before being able to move around with the keyboard.
You need to look at the Navigation part of the buttons. set it to automatic and it should take care of an easy set of buttons.
I’ve got mine set to none because I don’t want the HUD buttons reacting the player movement but you can just play with the settings, Automatic will probably fix what you want instantly though.
Click on visualize and it’ll show arrows on the canvas displaying which button links to which.