Struct PlanningAgent
A custom trait for marking the planning agent (automatically set by planner)
Namespace: Unity.AI.Planner.Traits
Syntax
public struct PlanningAgent : ICustomTrait, ITrait, IBufferElementData, IEquatable<PlanningAgent>
Methods
Equals(PlanningAgent)
Indicates the equality of another PlanningAgent and this instance.
Declaration
public bool Equals(PlanningAgent other)
Parameters
Type | Name | Description |
---|---|---|
PlanningAgent | other | The other PlanningAgent instance for comparison. |
Returns
Type | Description |
---|---|
Boolean | Always returns true. |
GetField(String)
GetField is deprecated. Cast the trait to the appropriate type, then access the field.
Declaration
[Obsolete("GetField is deprecated. Cast the trait to the appropriate type, then access the field.")]
public object GetField(string fieldName)
Parameters
Type | Name | Description |
---|---|---|
String | fieldName | The field name to be read. |
Returns
Type | Description |
---|---|
Object | The value of the field. |
Implements
Exceptions
Type | Condition |
---|---|
ArgumentException | Always throws an exception. PlanningAgent contains no fields. |
SetField(String, Object)
SetField is deprecated. Cast the trait to the appropriate type, then access the field.
Declaration
[Obsolete("SetField is deprecated. Cast the trait to the appropriate type, then access the field.")]
public void SetField(string fieldName, object value)
Parameters
Type | Name | Description |
---|---|---|
String | fieldName | The name of the field to be set. |
Object | value | The value for the field. |
Implements
ToString()
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
String |