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

IDataSource Interface

Interface expressing that an instance is an integration point from which data can be retrieved.
This is a conceptual increment on IDataSource, adding only a specification of the type of data provided and an accessor to retrieve that data.

Properties

CurrentDataVersion : int
[Get]
Indicator which is incremented every time new data becomes available.
Exceptionally high-frequency data in exceptionally long-running experiences can potentially overflow this value, leading to undefined behavior. While this is not expected to be a factor in typical cases, wildly high-frequency scenarios may need to destroy and recreate their IDataSources periodically to avoid hitting this limit.
Signature
int Oculus.Interaction.Input.IDataSource< TData >.CurrentDataVersion

Events

InputDataAvailable : Action
Notifies observers that new data is available from this source.
Data is typically retrieved by calling IDataSource<TData>.GetData.
If observing a Hand instance, use Hand.WhenHandUpdated instead of this event.
Signature
Action Oculus.Interaction.Input.IDataSource< TData >.InputDataAvailable

Methods

GetData ()
Retrieves the TData currently contained by this source.
If IDataSource.MarkInputDataRequiresUpdate has been called since the last invocation of this method, all required work to lazily update the contained data will be executed within this call.
Signature
TData Oculus.Interaction.Input.IDataSource< TData >.GetData()
Returns
TData  The TData currently contained by this source
MarkInputDataRequiresUpdate ()
Marks the data asset (for example, HandDataAsset) stored as outdated, which means it should be re-processed the next time data is retrieved from this source.
Signature
void Oculus.Interaction.Input.IDataSource< TData >.MarkInputDataRequiresUpdate()
Returns
void