API reference

DataSource Class

Extends MonoBehaviour
Base class for most concrete IDataSource types.
Conceptually, any type which produces data can be an IDataSource for that data type, but in practice usage is more constrained (though still pervasive throughout the Interaction SDK). Descendent types of this DataSource implementation specifically are also MonoBehaviours; thus, the expectation for descendent types is that they will be long-lived instances which persistently provide data over a period of time, on a schedule specified by UpdateModeFlags but typically tied in some way into MonoBehaviour's built-in update capabilites.

Protected Fields

_started : bool
Signature
bool _started

Protected Properties

DataAsset : abstract TData
[Get]
Returns the current DataAsset, without performing any updates.
Signature
abstract TData DataAsset
UpdateModeAfterPrevious : bool
[Get]
Signature
bool UpdateModeAfterPrevious

Properties

CurrentDataVersion : int
[Get]
Implementation of IDataSource.CurrentDataVersion; for details, please refer to the related documentation provided for that interface.
Signature
virtual int CurrentDataVersion
Started : bool
[Get]
Indicates whether or not the MonoBehaviour start-up process has completed for this instance.
Signature
bool Started
UpdateMode : UpdateModeFlags
[Get]
Returns the UpdateModeFlags specifying the circumstances under which the data contained in this instance will be updated.
Signature
UpdateModeFlags UpdateMode

Events

InputDataAvailable : Action
Implementation of IDataSource.InputDataAvailable; for details, please refer to the related documentation provided for that interface.
Signature
Action InputDataAvailable

Protected Methods

FixedUpdate ()
Signature
virtual void FixedUpdate()
Returns
void
LateUpdate ()
Signature
virtual void LateUpdate()
Returns
void
OnDisable ()
Signature
virtual void OnDisable()
Returns
void
OnEnable ()
Signature
virtual void OnEnable()
Returns
void
RequiresUpdate ()
Signature
bool RequiresUpdate()
Returns
bool
ResetUpdateAfter ( updateAfter , updateMode )
Signature
void ResetUpdateAfter(IDataSource updateAfter, UpdateModeFlags updateMode)
Parameters
updateAfter: IDataSource
updateMode: UpdateModeFlags
Returns
void
Start ()
Signature
virtual void Start()
Returns
void
Update ()
Signature
virtual void Update()
Returns
void
UpdateData ()
Signature
abstract void UpdateData()
Returns
abstract void

Methods

GetData ()
Implementation of IDataSource<TData>.GetData; for details, please refer to the related documentation provided for that interface.
Signature
TData GetData()
Returns
TData
InjectAllDataSource ( updateMode , updateAfter )
Injects all required dependencies for a dynamically instantiated DataSource; effectively wraps InjectUpdateMode(UpdateModeFlags) and InjectUpdateAfter(IDataSource).
This method exists to support Interaction SDK's dependency injection pattern and is not needed for typical Unity Editor-based usage.
Signature
void InjectAllDataSource(UpdateModeFlags updateMode, IDataSource updateAfter)
Parameters
updateMode: UpdateModeFlags
updateAfter: IDataSource
Returns
void
InjectUpdateAfter ( updateAfter )
Sets the IDataSource to update after for a dynamically instantiated DataSource.
This method exists to support Interaction SDK's dependency injection pattern and is not needed for typical Unity Editor-based usage.
Signature
void InjectUpdateAfter(IDataSource updateAfter)
Parameters
updateAfter: IDataSource
Returns
void
InjectUpdateMode ( updateMode )
Sets the UpdateModeFlags for a dynamically instantiated DataSource.
This method exists to support Interaction SDK's dependency injection pattern and is not needed for typical Unity Editor-based usage.
Signature
void InjectUpdateMode(UpdateModeFlags updateMode)
Parameters
updateMode: UpdateModeFlags
Returns
void
MarkInputDataRequiresUpdate ()
Implementation of IDataSource.MarkInputDataRequiresUpdate; for details, please refer to the related documentation provided for that interface.
Signature
virtual void MarkInputDataRequiresUpdate()
Returns
void