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

    Interface IPlan<TStateKey, TActionKey>

    An interface that marks an implementation of a data structure used by the planner to store the results of planning

    Namespace: Unity.AI.Planner
    Syntax
    public interface IPlan<TStateKey, TActionKey> : IDisposable where TStateKey : struct
    Type Parameters
    Name Description
    TStateKey

    StateKey type

    TActionKey

    ActionKey type

    Properties

    RootStateKey

    A key to access the root state of the plan

    Declaration
    TStateKey RootStateKey { get; }
    Property Value
    Type Description
    TStateKey

    Methods

    GetOptimalAction(TStateKey, out TActionKey)

    Returns the key for the optimal action for the given state.

    Declaration
    bool GetOptimalAction(TStateKey stateKey, out TActionKey actionKey)
    Parameters
    Type Name Description
    TStateKey stateKey

    Key for state to access

    TActionKey actionKey

    Key to hold optimal action key

    Returns
    Type Description
    System.Boolean

    Whether an optimal action was found

    Reset(TStateKey)

    Resets the plan with a new state for the root

    Declaration
    void Reset(TStateKey rootStateKey)
    Parameters
    Type Name Description
    TStateKey rootStateKey

    State key corresponding to the state for the new plan root

    UpdatePlan(TStateKey)

    Updates the root state to the given state

    Declaration
    void UpdatePlan(TStateKey rootStateKey)
    Parameters
    Type Name Description
    TStateKey rootStateKey

    State key corresponding to the state for the new plan root

    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