Menu Navigation
Last updated
Last updated
Starting with the version 1.0.2 of the template we use default ui navigation that comes with Input System.
Every scene you want to have UI navigation in should have game object with the Input System UI Input Module Component attached.
For every page you must ensure the following:
It assigns a one of it's buttons as selected when opened using EventSystem.current.SetSelectedGameObject(button.gameObject);
Subscribe to the GameController.InputManager.onInputChanged event. If the new InputType is not UIJoystick, than assigns a one of it's buttons as selected again.
All of it's buttons can navigate only to each other. Use Navigation field of a Button Component.
Every Button Component that can be selected also has to have Highlightable Button UI Component.
The arrows are spawned inside Highlights Parent Canvas, that is a child of the Input Manager Game Object from the Main Menu scene. This canvas is drawn on top of every other canvases to prevent hierarchy from interfering with the arrows
If the active input type is Gamepad or Keyboard, the selected button that has Highlightable Button UI Component attached will be highlighted with two small animated arrows. The prefab for the arrows "Button Selection Arrow" is located here: You can change it with any other image you want, animated or not.