Struct Location
A custom trait for locations, since it is commonly used in domains
Namespace: Unity.AI.Planner.DomainLanguage.TraitBased
Syntax
[Serializable]
public struct Location : ICustomTrait<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
public int TransformInstanceID
Field Value
Type | Description |
---|---|
System.Int32 |
Properties
Transform
The transform of the location
Declaration
public Transform Transform { get; set; }
Property Value
Type | Description |
---|---|
Transform |
Methods
Equals(Location)
Compares the 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 |
---|---|
System.Boolean | Returns true if the two locations are equal |
GetHashCode()
Get the hash code
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
System.Int32 | Hash code |
Overrides
SetField(String, Object)
Set the value of a field
Declaration
public void SetField(string fieldName, object value)
Parameters
Type | Name | Description |
---|---|---|
System.String | fieldName | Name of field |
System.Object | value | Value |
Implements
ToString()
Returns a string that represents the location
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
System.String | A string that represents the location |