Class Controller<TAgent> | Package Manager UI website
docs.unity3d.com
    Show / Hide Table of Contents

    Class Controller<TAgent>

    The control mechanism responsible for executing actions from the plan, monitoring progress of the operational actions, and updating the progress of the plan

    Inheritance
    System.Object
    Controller<TAgent>
    Namespace: Unity.AI.Planner.Agent
    Syntax
    public class Controller<TAgent>
    Type Parameters
    Name Description
    TAgent

    The type of agent for which the controller acts

    Constructors

    Controller(IPolicyGraph, Entity, TAgent, Dictionary<String, IOperationalAction<TAgent>>, Func<IPolicyGraph, Boolean>)

    Initializes the controller

    Declaration
    public Controller(IPolicyGraph plan, Entity stateEntity, TAgent agent, Dictionary<string, IOperationalAction<TAgent>> actionMapping, Func<IPolicyGraph, bool> checkPlan = null)
    Parameters
    Type Name Description
    IPolicyGraph plan

    Plan for the controller to update and execute

    Entity stateEntity

    Entity corresponding to the current state

    TAgent agent

    Agent controlled

    System.Collections.Generic.Dictionary<System.String, IOperationalAction<TAgent>> actionMapping
    System.Func<IPolicyGraph, System.Boolean> checkPlan

    A function to check if the plan is ready before the each action is taken

    Properties

    CurrentOperationalAction

    The operational action currently executing

    Declaration
    public IOperationalAction<TAgent> CurrentOperationalAction { get; }
    Property Value
    Type Description
    IOperationalAction<TAgent>

    CurrentStateEntity

    Entity corresponding to the current state

    Declaration
    public Entity CurrentStateEntity { get; protected set; }
    Property Value
    Type Description
    Entity

    Methods

    CompleteAction()

    Forces the end of the current operational action. Updates the plan to the controller's current state.

    Declaration
    public void CompleteAction()

    Update()

    Updates the controller, advances the plan or continues execution of an operational action

    Declaration
    public void Update()
    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