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

    Struct Location

    A custom trait for locations, since it is commonly used in domains

    Namespace: Unity.AI.Planner.Traits
    Syntax
    [Serializable]
    public struct Location : ICustomTrait, ITrait, IBufferElementData, IEquatable<Location>

    Fields

    Forward

    The forward vector of the location

    Declaration
    public Vector3 Forward
    Field Value
    Type Description
    Vector3

    Position

    The position of the location

    Declaration
    public Vector3 Position
    Field Value
    Type Description
    Vector3

    TransformInstanceId

    The Id of the transform of the location

    Declaration
    [FormerlySerializedAs("TransformInstanceID")]
    public int TransformInstanceId
    Field Value
    Type Description
    Int32

    Properties

    Transform

    The transform of the location

    Declaration
    public Transform Transform { get; set; }
    Property Value
    Type Description
    Transform

    Methods

    Equals(Location)

    Compares this location to another

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

    Another location to which the location is compared

    Returns
    Type Description
    Boolean

    Returns true if the two locations are equal

    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

    Field value if field exists

    Implements
    ITrait.GetField(String)

    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 location

    Declaration
    public override string ToString()
    Returns
    Type Description
    String

    A string that represents the location

    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