Struct ActionKey | AI Planner | 0.2.4-preview.3
docs.unity3d.com
    Show / Hide Table of Contents

    Struct ActionKey

    A concrete action key for trait-based state representation

    Namespace: Unity.AI.Planner.Traits
    Syntax
    public struct ActionKey : IEquatable<ActionKey>, IActionKeyWithGuid, IActionKey

    Constructors

    ActionKey(Int32)

    Create a new action key with a specified number of arguments

    Declaration
    public ActionKey(int length)
    Parameters
    Type Name Description
    Int32 length

    Properties

    ActionGuid

    A GUID (Globally Unique Identifier) for an action type

    Declaration
    public Guid ActionGuid { get; set; }
    Property Value
    Type Description
    Guid

    Item[Int32]

    Access an action argument by index

    Declaration
    public int this[int index] { get; set; }
    Parameters
    Type Name Description
    Int32 index

    Index of action argument

    Property Value
    Type Description
    Int32
    Exceptions
    Type Condition
    IndexOutOfRangeException

    Throws an exception if the index is >= Length

    Length

    The number of arguments for this action

    Declaration
    public int Length { get; }
    Property Value
    Type Description
    Int32

    MaxLength

    The maximum number of arguments that an action can have

    Declaration
    public static int MaxLength { get; }
    Property Value
    Type Description
    Int32

    Methods

    Equals(Object)

    Test for equality

    Declaration
    public override bool Equals(object obj)
    Parameters
    Type Name Description
    Object obj

    Other action

    Returns
    Type Description
    Boolean

    Result of equality test

    Overrides
    ValueType.Equals(Object)

    Equals(ActionKey)

    Test for equality

    Declaration
    public bool Equals(ActionKey other)
    Parameters
    Type Name Description
    ActionKey other

    Other action

    Returns
    Type Description
    Boolean

    Result of equality test

    GetHashCode()

    Get the hash code

    Declaration
    public override int GetHashCode()
    Returns
    Type Description
    Int32

    Hash code

    Overrides
    ValueType.GetHashCode()

    ToString()

    Returns a string that represents the ActionKey

    Declaration
    public override string ToString()
    Returns
    Type Description
    String

    A string that represents the ActionKey

    Overrides
    ValueType.ToString()
    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