Class SynthesizedTrackable
Base representation of a single data type in a Synthesized MARS data Most often you'll want to inherit from SynthesizedTrackable<T> instead
Namespace: Unity.MARS.Data.Synthetic
Syntax
public abstract class SynthesizedTrackable : MonoBehaviour, ISimulatable, ISynthesizedData
Properties
HasValidValue
True if the data for this SynthesizedTrackable is valid
Declaration
public virtual bool HasValidValue { get; }
Property Value
Type | Description |
---|---|
Boolean |
Implements
SynthesizedObject
The SynthesizedObject associated with this SynthesizedTrackable
Declaration
public SynthesizedObject SynthesizedObject { get; }
Property Value
Type | Description |
---|---|
SynthesizedObject |
Implements
TraitName
The trait name associated with this SynthesizedTrackable
Declaration
public abstract string TraitName { get; }
Property Value
Type | Description |
---|---|
String |
Implements
Methods
AddSynthData(Int32)
Called when the SynthesizedObject is appending this data to an existing object
Declaration
public abstract void AddSynthData(int dataID)
Parameters
Type | Name | Description |
---|---|---|
Int32 | dataID | The entity that will hold the synthesized data |
Awake()
Called by Unity when the object is first activated
Declaration
protected virtual void Awake()
Initialize()
Called when the SynthesizedTrackable is used for the first time by a SynthesizedObject
Declaration
public virtual void Initialize()
OnDisable()
Called by Unity when the object is disabled
Declaration
protected virtual void OnDisable()
OnEnable()
Called by Unity when the object is enabled
Declaration
protected virtual void OnEnable()
RemoveSynthData(Int32)
Called when the SynthesizedObject around this data is being removed
Declaration
public abstract void RemoveSynthData(int dataID)
Parameters
Type | Name | Description |
---|---|---|
Int32 | dataID | The entity that holds this data |
Terminate()
Called when the SynthesizedTrackable data is cleared by a SynthesizedObject
Declaration
public virtual void Terminate()
TryAdd()
Try to add this trait to the associated SynthesizedObject
Declaration
public bool TryAdd()
Returns
Type | Description |
---|---|
Boolean | True if the trait was added successfully |
Implements
TryRemove()
Try to remove this trait from the associated SynthesizedObject
Declaration
public bool TryRemove()
Returns
Type | Description |
---|---|
Boolean | True if the trait was removed successfully |
Implements
UpdateSynthData()
Called when the SynthesizedObject around this data is being updated
Declaration
public abstract void UpdateSynthData()