docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    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.

    In This Article
    Back to top
    Copyright © 2026 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)