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
int CurrentDataVersion[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.
Events
Action InputDataAvailable
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.
Member Functions
void 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.
TData 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.