API reference
API reference
Select your platform
No SDKs available
No versions available

DataSource Class

Extends MonoBehaviour, IDataSource< TData >
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.
Others
TData

Fields

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

Protected Fields

bool _started[Get]
bool UpdateModeAfterPrevious[Get]

Events

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

Properties

Returns the current DataAsset, without performing any updates.
Returns
Null if no call to GetData has been made since this data source was initialized.

Protected Functions

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

Member Functions

Implementation of IDataSource<TData>.GetData; for details, please refer to the related documentation provided for that interface.
Implementation of IDataSource.MarkInputDataRequiresUpdate; for details, please refer to the related documentation provided for that interface.
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.
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.
Parameters
updateMode
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.
Did you find this page helpful?
Thumbs up icon
Thumbs down icon