UI Event System Navigation Issues

Two UI/Event System questions:

  1. In my settings menu, I have a few right/left >/< buttons set to scroll through options (ie, Resolution/Language options), and if you get to the end of the list of options, I deactivate the interactibility of that button to indicate that’s the end of that list. The problem I’m having is that if you are using the joystick/keyboard to navigate instead of the mouse and the button that is currently selected becomes deactivated, the navigation stops working and you can’t navigate to any other buttons except with the mouse. How do you tell the Event System that if a currently-selected button has become deactivated, it should move to the next button?

  2. The keyboard/joystick navigation for several of the menus is a tad…wonky. Meaning it doesn’t seem to follow any sort of logical order either on the screen or in the hierarchy. I adjusted the clickable area of the buttons (so that they all have the same horizontal space), and that made it a bit better, but where I have the right/left >/< buttons I mentioned in my example above, the navigation still will skip over some buttons. I know how to set the “First selected” button in the EventSystem inspector, but how do you specify what order the other buttons should be navigated to?

You would honestly handle the chance of focus yourself. Ergo, when you disable the button, you also focus the next button as per your desired logic.

Assuming you’re talking uGUI, you can set up the navigation of selectable elements in their inspector: Navigation Options | Unity UI | 3.0.0-exp.4

Cheers, I just didn’t know how to assign the focus to a specific button, but I did some more digging and uncovered [nameOfButton].Select(); which seems to do the trick, and I’m using that to control the navigation for the sub-menus as well.

1 Like