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

    Struct TraitBasedObjectId

    The trait denoting that an entity represents a trait-based object

    Namespace: Unity.AI.Planner.Traits
    Syntax
    public struct TraitBasedObjectId : ITrait, IBufferElementData, IEquatable<TraitBasedObjectId>

    Fields

    Id

    A unique ObjectId assigned to the trait-based object

    Declaration
    public ObjectId Id
    Field Value
    Type Description
    ObjectId

    None

    Default TraitBasedObjectId representing no Object

    Declaration
    public static readonly TraitBasedObjectId None
    Field Value
    Type Description
    TraitBasedObjectId

    Methods

    Equals(Object)

    Test for equality

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

    Other TraitBasedObjectId

    Returns
    Type Description
    Boolean

    Result of equality test

    Overrides
    ValueType.Equals(Object)

    Equals(TraitBasedObjectId)

    Test for equality

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

    Other TraitBasedObjectId

    Returns
    Type Description
    Boolean

    Result of equality test

    GetField(String)

    Get the value of a field

    Declaration
    public object GetField(string fieldName)
    Parameters
    Type Name Description
    String fieldName

    Name of field

    Returns
    Type Description
    Object

    Value

    Implements
    ITrait.GetField(String)

    GetHashCode()

    Get the hash code

    Declaration
    public override int GetHashCode()
    Returns
    Type Description
    Int32

    Hash code

    Overrides
    ValueType.GetHashCode()

    GetNext()

    Provides a new TraitBasedObjectId with a unique ObjectId

    Declaration
    public static TraitBasedObjectId GetNext()
    Returns
    Type Description
    TraitBasedObjectId

    Returns a new TraitBasedObjectId with a new unique ObjectId

    SetField(String, Object)

    Set the value of a field

    Declaration
    public void SetField(string fieldName, object value)
    Parameters
    Type Name Description
    String fieldName

    Name of field

    Object value

    Value

    Implements
    ITrait.SetField(String, Object)

    ToString()

    Returns a string that represents the TraitBasedObjectId

    Declaration
    public override string ToString()
    Returns
    Type Description
    String

    A string that represents the TraitBasedObjectId

    Overrides
    ValueType.ToString()

    Operators

    Equality(TraitBasedObjectId, TraitBasedObjectId)

    Compares two given TraitBasedObjectIds

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

    A TraitBasedObjectId

    TraitBasedObjectId y

    A TraitBasedObjectId

    Returns
    Type Description
    Boolean

    Returns if two TraitBasedObjectIds are equal

    Inequality(TraitBasedObjectId, TraitBasedObjectId)

    Compares two given TraitBasedObjectIds

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

    A TraitBasedObjectId

    TraitBasedObjectId y

    A TraitBasedObjectId

    Returns
    Type Description
    Boolean

    Returns if two TraitBasedObjectIds 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