Enum Navigation.Mode
Navigation mode enumeration.
Namespace: UnityEngine.UI
Assembly: UnityEngine.UI.dll
Syntax
[Flags]
public enum Navigation.Mode
Remarks
This looks like it's not flags, but it is flags. The reason is that Automatic is considered horizontal and vertical mode combined
Examples
using UnityEngine;
using System.Collections;
using UnityEngine.UI; // Required when Using UI elements.
public class ExampleClass : MonoBehaviour
{
public Button button;
void Start()
{
//Set the navigation to the mode "Vertical".
if (button.navigation.mode == Navigation.Mode.Vertical)
{
Debug.Log("The button's navigation mode is Vertical");
}
}
}
Fields
| Name | Description |
|---|---|
| Automatic | Automatic navigation. |
| Explicit | Explicit navigation. |
| Horizontal | Horizontal Navigation. |
| None | No navigation is allowed from this object. |
| Vertical | Vertical navigation. |