NavigationStack

Class in Zigurous.UI

Declaration

public class NavigationStack : MonoBehaviour

Description

Manages a stack of game objects for menu navigation purposes. This is especially useful to handle backwards navigation by simply popping off the last item in the stack.

Properties

eventSystemThe event system being tracked by the navigation stack (Read only).
itemsThe game objects added to the stack (Read only).
topThe current selected game object at the top of the stack (Read only).
rootGameObjectThe root game object added to the bottom of the stack.
setActiveStateAutomatically sets the active state of game objects as they are pushed on and off the stack.
allowEmptyStackAllows for all items to be popped off the stack. Often times you want to maintain at least the root game object.
allowNullSelectionsAllows for null game objects to be pushed onto the stack.

Methods

PushPushes a game object onto the stack, effectively navigating forwards.
PopPops the last game object off the stack, effectively navigating backwards.