docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class LiftedState

    Represents a state wrapper used by Redux DevTools for debugging and time-travel functionality. This state maintains the action history, computed states, and configuration settings needed for development tools to function.

    Inheritance
    object
    LiftedState
    Implements
    IEquatable<LiftedState>
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Unity.AppUI.Redux.DevTools
    Assembly: Unity.AppUI.Redux.dll
    Syntax
    [Serializable]
    public record LiftedState : IEquatable<LiftedState>
    Remarks

    The lifted state tracks:

    • Action history with unique IDs
    • Computed states at each action
    • Staging and skipping of actions
    • Time-travel position via currentStateIndex
    • DevTools configuration state (locked/paused)

    Constructors

    LiftedState()

    Initializes a new instance of the LiftedState class.

    Declaration
    public LiftedState()

    LiftedState(object, DevToolsConfiguration)

    Initializes a new instance of the LiftedState class with initial state and configuration.

    Declaration
    public LiftedState(object initialCommitState, DevToolsConfiguration options)
    Parameters
    Type Name Description
    object initialCommitState

    The initial application state to commit.

    DevToolsConfiguration options

    Configuration options controlling DevTools behavior.

    Remarks

    Sets up initial state with:

    • Action ID counter starting at 1
    • Initial action (type: @@INIT) at index 0
    • Empty skipped actions set
    • DevTools configuration from options

    Fields

    actionsById

    Gets or sets the mapping of action IDs to their corresponding lifted actions. Index 0 always contains the initialization action.

    Declaration
    public Dictionary<int, LiftedAction> actionsById
    Field Value
    Type Description
    Dictionary<int, LiftedAction>

    committedState

    Gets or sets the last confirmed application state. This represents the baseline state for computing future states.

    Declaration
    public object committedState
    Field Value
    Type Description
    object

    computedStates

    Gets or sets the list of computed states resulting from action application. Each state represents the application state after applying actions up to that index.

    Declaration
    public List<ComputedState> computedStates
    Field Value
    Type Description
    List<ComputedState>

    currentStateIndex

    Gets or sets the index of the currently selected state in the time-travel sequence. -1 represents the initial state before any actions.

    Declaration
    public int currentStateIndex
    Field Value
    Type Description
    int

    isLocked

    Gets or sets whether the DevTools are locked, preventing state changes. When true, dispatched actions are blocked from modifying state.

    Declaration
    public bool isLocked
    Field Value
    Type Description
    bool

    isPaused

    Gets or sets whether action recording is paused. When true, new actions are not added to the action history.

    Declaration
    public bool isPaused
    Field Value
    Type Description
    bool

    nextActionId

    Gets or sets the incrementing identifier for the next action. Used to assign unique IDs to new actions as they are dispatched.

    Declaration
    public int nextActionId
    Field Value
    Type Description
    int

    skippedActionIds

    Gets or sets the set of action IDs that are currently disabled/skipped. Skipped actions are temporarily removed from state computation.

    Declaration
    public HashSet<int> skippedActionIds
    Field Value
    Type Description
    HashSet<int>

    stagedActionIds

    Gets or sets the ordered list of action IDs representing the current action sequence. Used for maintaining action order and time-travel capabilities.

    Declaration
    public List<int> stagedActionIds
    Field Value
    Type Description
    List<int>

    Implements

    IEquatable<T>
    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)