Interface ITraitBasedObjectData
An interface that marks an implementation of object data used to initialize a planner state;
Namespace: Unity.AI.Planner.DomainLanguage.TraitBased
Syntax
public interface ITraitBasedObjectData
Properties
Name
Name of the TraitBasedObject
Declaration
string Name { get; set; }
Property Value
Type | Description |
---|---|
String |
ParentObject
Object that holds this instance
Declaration
object ParentObject { get; }
Property Value
Type | Description |
---|---|
Object |
TraitData
List of data for traits
Declaration
IList<TraitData> TraitData { get; }
Property Value
Type | Description |
---|---|
IList<TraitData> |
Methods
GetTraitData<TTrait>()
Get data for a given trait
Declaration
TraitData GetTraitData<TTrait>()
where TTrait : ITrait
Returns
Type | Description |
---|---|
TraitData | Initialization data |
Type Parameters
Name | Description |
---|---|
TTrait | Trait type |
HasTraitData<TTrait>()
Checks whether the object has a specific type of trait
Declaration
bool HasTraitData<TTrait>()
where TTrait : ITrait
Returns
Type | Description |
---|---|
Boolean | True, if the object has the trait |
Type Parameters
Name | Description |
---|---|
TTrait | Trait type |
RemoveTraitData<TTrait>()
Remove data for a given trait
Declaration
void RemoveTraitData<TTrait>()
where TTrait : ITrait
Type Parameters
Name | Description |
---|---|
TTrait | Trait type |