Interface IPlanExecutor | AI Planner | 0.2.4-preview.3
docs.unity.cn
    Show / Hide Table of Contents

    Interface IPlanExecutor

    An interface denoting the implementation of a plan executor.

    Namespace: Unity.AI.Planner
    Syntax
    public interface IPlanExecutor

    Properties

    CurrentActionKey

    The action key of the current action in the plan.

    Declaration
    IActionKey CurrentActionKey { get; }
    Property Value
    Type Description
    IActionKey

    CurrentExecutorStateKey

    The state key of the current executor state, as used by the executor to track the execution of the plan.

    Declaration
    IStateKey CurrentExecutorStateKey { get; }
    Property Value
    Type Description
    IStateKey

    CurrentPlanStateKey

    The state key of the plan state corresponding to the executor's current state

    Declaration
    IStateKey CurrentPlanStateKey { get; }
    Property Value
    Type Description
    IStateKey

    CurrentStateData

    State data for the executor's current state.

    Declaration
    IStateData CurrentStateData { get; }
    Property Value
    Type Description
    IStateData

    Plan

    The plan to be executed.

    Declaration
    IPlan Plan { get; }
    Property Value
    Type Description
    IPlan

    Status

    The status of the plan executor.

    Declaration
    PlanExecutionStatus Status { get; }
    Property Value
    Type Description
    PlanExecutionStatus

    Methods

    ExecuteNextAction(IActionKey)

    Initiates the next action of the plan. By default, the action with the highest value is chosen.

    Declaration
    void ExecuteNextAction(IActionKey overrideAction = null)
    Parameters
    Type Name Description
    IActionKey overrideAction

    An optionally specified action to enact.

    GetActionName(IActionKey)

    Returns the name of an action given the action key.

    Declaration
    string GetActionName(IActionKey actionKey)
    Parameters
    Type Name Description
    IActionKey actionKey

    The key of the action.

    Returns
    Type Description
    String

    Returns the name of an action given the action key.

    GetActionParametersInfo(IStateKey, IActionKey)

    Returns parameter data string for a given action key.

    Declaration
    ActionParameterInfo[] GetActionParametersInfo(IStateKey stateKey, IActionKey actionKey)
    Parameters
    Type Name Description
    IStateKey stateKey

    The key for the state.

    IActionKey actionKey

    The key for the action.

    Returns
    Type Description
    ActionParameterInfo[]

    Returns parameter name and data string for a given action key.

    ReadyToAct()

    Checks the state of the executor and of the plan against the criteria from the plan execution settings. If the criteria are met, the executor is ready to initiate the next action.

    Declaration
    bool ReadyToAct()
    Returns
    Type Description
    Boolean

    Returns true if the plan execution criteria are met and false, otherwise.

    SetPlan(IPlan)

    Sets the plan for the executor to enact.

    Declaration
    void SetPlan(IPlan plan)
    Parameters
    Type Name Description
    IPlan plan

    The plan to enact.

    StopExecution()

    Stops the execution of the current action.

    Declaration
    void StopExecution()

    UpdateCurrentState(IStateData)

    Updates the current state used by the controller to track execution of the plan.

    Declaration
    void UpdateCurrentState(IStateData stateData)
    Parameters
    Type Name Description
    IStateData stateData

    The state data representing the state to be used.

    UpdateCurrentState(IStateKey)

    Updates the current state used by the executor.

    Declaration
    void UpdateCurrentState(IStateKey stateKey)
    Parameters
    Type Name Description
    IStateKey stateKey
    Back to top Copyright © 2020 Unity Technologies
    Generated by DocFX
    on 13 November 2020