Interface ITrait
The interface denoting that the container is a trait.
Namespace: Unity.AI.Planner.Traits
Syntax
public interface ITrait
Methods
GetField(String)
Get the value of a field
Declaration
[Obsolete("GetField is deprecated. Cast the trait to the appropriate type, then access the field. (RemovedAfter 2020-12-14)")]
object GetField(string fieldName)
Parameters
Type | Name | Description |
---|---|---|
String | fieldName | Name of field |
Returns
Type | Description |
---|---|
Object | Field value if field exists |
SetField(String, Object)
Set a field on the trait (alternative to using reflection)
Declaration
[Obsolete("SetField is deprecated. Cast the trait to the appropriate type, then access the field. (RemovedAfter 2020-12-14)")]
void SetField(string fieldName, object value)
Parameters
Type | Name | Description |
---|---|---|
String | fieldName | Name of the field |
Object | value | Value to set |