Game Development Reference
In-Depth Information
This kind of pattern could be used for any scrollable type of UI, from inventory
items to Mini-maps, it's very flexible.
Navigation
We close his chapter with a quick walk-through control navigation, or the ability to
change focus from one interactable control to another using the keyboard.
At the time of writing, tabbing between controls is not supported.
Selectable's are only navigated between each other using direction
keys (up, down, left, and right); there is no Control order to tab
through. You could of course write your own system (for which
there is an example in Chapter 6 , Working with the UI Source) .
As we have seen in many of the inspector screenshots earlier in this chapter, most
controls come with built-in Navigation behavior properties including a button called
Visualize to view the navigation in the editor, as shown here:
Note: Navigation features are limited to those UI controls that
implement the Selectable component, be it the built-in controls such as
buttons, sliders, toggles, and so on, or those controls you build yourself.
By default (automatic), Unity will navigate from control to control by its nearest
neighbor in the direction the user navigates (up/down/left/right); if we align controls
vertically and horizontally, this would produce the following navigation pattern:
 
Search WWH ::




Custom Search