Interface IStateDataContext<TStateKey, TStateData> | Package Manager UI website
docs.unity3d.com
    Show / Hide Table of Contents

    Interface IStateDataContext<TStateKey, TStateData>

    An interface that marks an implementation of a wrapper context for managing states within a domain. Not all domain language implementations may require a state data context, but for those that do (e.g. Entities-based) it provides a way to work with states in a detached manager from the StateManager (e.g. within jobs) and queue any changes up for playback later.

    Namespace: Unity.AI.Planner
    Syntax
    public interface IStateDataContext<TStateKey, TStateData> : IEqualityComparer<TStateData> where TStateKey : struct, IEquatable<TStateKey> where TStateData : struct
    Type Parameters
    Name Description
    TStateKey

    StateKey type

    TStateData

    StateData type

    Methods

    CopyStateData(TStateData)

    Copy an existing state

    Declaration
    TStateData CopyStateData(TStateData stateData)
    Parameters
    Type Name Description
    TStateData stateData

    Existing state to copy

    Returns
    Type Description
    TStateData

    Copied state

    GetStateData(TStateKey)

    Get the state data for a given key

    Declaration
    TStateData GetStateData(TStateKey stateKey)
    Parameters
    Type Name Description
    TStateKey stateKey

    Key to access the state

    Returns
    Type Description
    TStateData

    State data for the given key

    Back to top
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023