Struct ActionContext | Package Manager UI website
docs.unity3d.com
    Show / Hide Table of Contents

    Struct ActionContext

    Planner context for an action that is provided to an operational action (e.g. IOperationalAction)

    Namespace: Unity.AI.Planner
    Syntax
    public struct ActionContext : IEquatable<ActionContext>

    Fields

    ActionEntity

    The entity for the planner action node in the policy graph

    Declaration
    public Entity ActionEntity
    Field Value
    Type Description
    Entity

    StateEntity

    The entity for the state in which the action is performed

    Declaration
    public Entity StateEntity
    Field Value
    Type Description
    Entity

    Properties

    Name

    The name of the planner action system that corresponds to this operational action

    Declaration
    public string Name { get; }
    Property Value
    Type Description
    System.String

    Methods

    Equals(Object)

    Declaration
    public override bool Equals(object obj)
    Parameters
    Type Name Description
    System.Object obj
    Returns
    Type Description
    System.Boolean
    Overrides
    System.ValueType.Equals(System.Object)

    Equals(ActionContext)

    Declaration
    public bool Equals(ActionContext other)
    Parameters
    Type Name Description
    ActionContext other
    Returns
    Type Description
    System.Boolean

    GetHashCode()

    Declaration
    public override int GetHashCode()
    Returns
    Type Description
    System.Int32
    Overrides
    System.ValueType.GetHashCode()

    GetTrait<T>(Int32)

    Return the trait for a specific argument (i.e. Entity) that was specified with the action

    Declaration
    public T GetTrait<T>(int argumentIndex)
        where T : struct, IComponentData
    Parameters
    Type Name Description
    System.Int32 argumentIndex

    Index of the argument (corresponds with the parameter index in the Plan Definition)

    Returns
    Type Description
    T

    The specified trait data

    Type Parameters
    Name Description
    T

    Trait type

    Operators

    Equality(ActionContext, ActionContext)

    Returns true if two ActionContexts are equal and false otherwise

    Declaration
    public static bool operator ==(ActionContext x, ActionContext y)
    Parameters
    Type Name Description
    ActionContext x

    An ActionContext to compare.

    ActionContext y

    An ActionContext to compare.

    Returns
    Type Description
    System.Boolean

    Returns true if two ActionContexts are equal.

    Inequality(ActionContext, ActionContext)

    Returns true if two ActionContexts are not equal and false otherwise

    Declaration
    public static bool operator !=(ActionContext x, ActionContext y)
    Parameters
    Type Name Description
    ActionContext x

    An ActionContext to compare.

    ActionContext y

    An ActionContext to compare.

    Returns
    Type Description
    System.Boolean

    Returns true if two ActionContexts are not equal.

    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