docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class NavGraphViewAsset

    Representation of a navigation graph as a Unity asset. This asset contain a hierarchy of NavGraph instances.

    Inheritance
    object
    Object
    ScriptableObject
    NavGraphViewAsset
    Inherited Members
    ScriptableObject.SetDirty()
    ScriptableObject.CreateInstance(string)
    ScriptableObject.CreateInstance(Type)
    ScriptableObject.CreateInstance<T>()
    Object.GetInstanceID()
    Object.GetHashCode()
    Object.Equals(object)
    Object.Instantiate(Object, Vector3, Quaternion)
    Object.Instantiate(Object, Vector3, Quaternion, Transform)
    Object.Instantiate(Object)
    Object.Instantiate(Object, Transform)
    Object.Instantiate(Object, Transform, bool)
    Object.Instantiate<T>(T)
    Object.Instantiate<T>(T, Vector3, Quaternion)
    Object.Instantiate<T>(T, Vector3, Quaternion, Transform)
    Object.Instantiate<T>(T, Transform)
    Object.Instantiate<T>(T, Transform, bool)
    Object.Destroy(Object, float)
    Object.Destroy(Object)
    Object.DestroyImmediate(Object, bool)
    Object.DestroyImmediate(Object)
    Object.FindObjectsOfType(Type)
    Object.FindObjectsOfType(Type, bool)
    Object.FindObjectsByType(Type, FindObjectsSortMode)
    Object.FindObjectsByType(Type, FindObjectsInactive, FindObjectsSortMode)
    Object.DontDestroyOnLoad(Object)
    Object.DestroyObject(Object, float)
    Object.DestroyObject(Object)
    Object.FindSceneObjectsOfType(Type)
    Object.FindObjectsOfTypeIncludingAssets(Type)
    Object.FindObjectsOfType<T>()
    Object.FindObjectsByType<T>(FindObjectsSortMode)
    Object.FindObjectsOfType<T>(bool)
    Object.FindObjectsByType<T>(FindObjectsInactive, FindObjectsSortMode)
    Object.FindObjectOfType<T>()
    Object.FindObjectOfType<T>(bool)
    Object.FindFirstObjectByType<T>()
    Object.FindAnyObjectByType<T>()
    Object.FindFirstObjectByType<T>(FindObjectsInactive)
    Object.FindAnyObjectByType<T>(FindObjectsInactive)
    Object.FindObjectsOfTypeAll(Type)
    Object.FindObjectOfType(Type)
    Object.FindFirstObjectByType(Type)
    Object.FindAnyObjectByType(Type)
    Object.FindObjectOfType(Type, bool)
    Object.FindFirstObjectByType(Type, FindObjectsInactive)
    Object.FindAnyObjectByType(Type, FindObjectsInactive)
    Object.ToString()
    Object.name
    Object.hideFlags
    object.Equals(object, object)
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    Namespace: Unity.AppUI.Navigation
    Assembly: Unity.AppUI.Navigation.dll
    Syntax
    [CreateAssetMenu(fileName = "New Navigation Graph.asset", menuName = "App UI/Navigation Graph")]
    public class NavGraphViewAsset : ScriptableObject

    Properties

    isEmpty

    Whether this navigation graph is empty.

    Declaration
    public bool isEmpty { get; }
    Property Value
    Type Description
    bool

    nodes

    The nodes of this navigation graph.

    Declaration
    public IEnumerable<NavGraphViewNode> nodes { get; }
    Property Value
    Type Description
    IEnumerable<NavGraphViewNode>

    rootGraph

    The root graph of this navigation graph.

    Declaration
    public NavGraph rootGraph { get; }
    Property Value
    Type Description
    NavGraph

    Methods

    AddNode(NavGraphViewNode)

    Add a node to this navigation graph. The component will be saved as a sub-asset of this graph.

    Declaration
    public void AddNode(NavGraphViewNode node)
    Parameters
    Type Name Description
    NavGraphViewNode node

    The component to add.

    CanNavigate(NavDestination, NavDestination, string)

    Find a destination by its id.

    Declaration
    public bool CanNavigate(NavDestination from, NavDestination to, string route)
    Parameters
    Type Name Description
    NavDestination from

    The source destination.

    NavDestination to

    The destination to find.

    string route

    The route to take to reach the destination.

    Returns
    Type Description
    bool

    True if the destination can be reached from the source destination, false otherwise.

    Exceptions
    Type Condition
    ArgumentNullException

    Thrown if the destination is null.

    FindDestinationByRoute(string)

    Find a destination by its id.

    Declaration
    public NavDestination FindDestinationByRoute(string route)
    Parameters
    Type Name Description
    string route

    The id of the destination to find.

    Returns
    Type Description
    NavDestination

    The destination if found, null otherwise.

    RemoveNode(NavGraphViewNode)

    Remove a component from this navigation graph. The component will be destroyed.

    Declaration
    public void RemoveNode(NavGraphViewNode node)
    Parameters
    Type Name Description
    NavGraphViewNode node

    The node to remove.

    TryFindAction(string, out NavAction)

    Find an action by its id.

    Declaration
    public bool TryFindAction(string actionId, out NavAction action)
    Parameters
    Type Name Description
    string actionId

    The id of the action to find.

    NavAction action

    The action if found, null otherwise.

    Returns
    Type Description
    bool

    True if the action was found, false otherwise.

    In This Article
    Back to top
    Copyright © 2025 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)