{!See https://docs.google.com/document/d/1takg_GmIBBKKTj-GHZCwzxohpQz7Bhekivkk72kYMtE/edit for reference implementation of OneTrust, dataLayer and GTM} {!OneTrust Cookies Consent} {!OneTrust Cookies Consent end} {!dataLayer initialization push} {!dataLayer initialization push end} {!Google Tag Manager} {!Google Tag Manager end} Class NavController | App UI | 0.5.5
docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class NavController

    The NavController manages navigation within a NavHost. It is responsible for keeping track of the navigation stack and the current destination.

    Inheritance
    object
    NavController
    Inherited Members
    object.ToString()
    object.Equals(object)
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    Namespace: Unity.AppUI.Navigation
    Assembly: solution.dll
    Syntax
    public class NavController

    Constructors

    Name Description
    NavController(NavHost)

    Default constructor.

    Properties

    Name Description
    canGoBack

    Returns true if there is a destination on the back stack that can be popped.

    currentBackStackEntry

    The last entry on the back stack.

    currentDestination

    The current destination.

    graph

    The current graph.

    graphAsset

    The used graph asset.

    Methods

    Name Description
    ClearBackStack()

    Clear the back stack entirely.

    Navigate(string, params Argument[])

    Navigate to the destination with the given name.

    Navigate(string, NavOptions, params Argument[])

    Navigate to the destination with the given name.

    Navigate(Uri, NavOptions)

    Navigate to the destination with the given DeepLink.

    PopBackStack()

    Pop the current destination from the back stack and navigate to the previous destination.

    PopBackStack(string, bool, bool)

    Pop the current destination from the back stack and navigate to the given destination.

    SetGraph(NavGraphViewAsset)

    Set the Navigation Graph asset that will be used as navigation definition.

    Events

    Name Description
    actionTriggered

    Event that is invoked when an action is triggered.

    destinationChanged

    Event that is invoked when the current destination changes.

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