(I should mention that my equipment submenu is an easy case. It works a little like the old PlayStation system menu, except rotated π/2 radians.
![unity pc build icon wont update unity pc build icon wont update](https://1.bp.blogspot.com/-mtSe0Ke_-Ts/U38IUepoEOI/AAAAAAAACx0/VwHyQZ3_VpI/s1600/05-UnityInstance.jpg)
For example, my submenu above knows that it’s the first item in the vertical list and is followed by the Sound slider. The Submenu also knows a few other things, such as which items are “previous” and “next” for the submenu, and what the currently selected item is. The Submenu itself isn’t Selectable it’s simply a manager for the items which are defined in the component. My Equipment submenu is implemented as a Submenu “container” class which contains multiple SubmenuItem objects.
![unity pc build icon wont update unity pc build icon wont update](https://servreality.com/wp-content/uploads/2020/08/photoeditorsdk-export58.png)
Our main stupid UI trick is rewiring navigation on the fly to build “submenus.” This signals to Unity that you’re handling the event in your code, rather than relying on Unity’s default behavior.
![unity pc build icon wont update unity pc build icon wont update](https://badsquad.net/wp-content/uploads/2021/01/HOW-TO-DOWNLOAD-THE-SIMS-4-for-FREE-ALL-DLCs-EXPANSION-PACKS-520x400.jpg)
Unity uses each object’s position to determine which object will be selected when navigating up, down, left, or right. By default, this is set to Automatic, which again, does the right thing in most cases. Selectable objects like buttons have a “Navigation” property. That’s thanks to… The Navigation Property
![unity pc build icon wont update unity pc build icon wont update](https://2.bp.blogspot.com/-Q7s_R5aP0og/TrOQWpAB-tI/AAAAAAAABfw/K7JAlXGCKGQ/s1600/Elementary+Borderless+GTK+3+theme+-+Unity%252C+Ubuntu+11.10.png)
If you’ve focused on mouse/touch interface when building your UI, good news: if it’s a grid-ish format, it probably works the way you’d expect. Unity UI navigation is pretty smart, and got me most of the way there. Importantly, the game’s intended to be played with a gamepad, so I didn’t want the presence or absence of mouse or touch input to affect this behavior. When a volume slider is selected, you can adjust the value with the horizontal axis. When “Equipment” is selected, you can choose an item to use or equip on the horizontal axis. If it’s not immediately obvious from the screenshot to the right, that’s essentially a vertical menu with items that have horizontal behaviors. One of the prime candidates for such a rewrite was the menu system. One of my goals in this experiment was to use base Unity functionality as much as possible, replacing 2D Toolkit and custom systems as much as possible.