DataSourceGOBase Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Base class for Data Sources that are accessible through a Game Object MonoBehaviour proxy
public abstract class DataSourceGOBase : UnityEngine.MonoBehaviour, MixedReality.Toolkit.Data.IDataSource, MixedReality.Toolkit.Data.IDataSourceProvider
type DataSourceGOBase = class
inherit MonoBehaviour
interface IDataSource
interface IDataSourceProvider
Public MustInherit Class DataSourceGOBase
Inherits MonoBehaviour
Implements IDataSource, IDataSourceProvider
- Inheritance
-
UnityEngine.MonoBehaviourDataSourceGOBase
- Derived
- Implements
Remarks
This class encapsulates a Data Source object so that it can exist as a MonoBehaviour, which is important for using the inspector to connect Data Consumers to a Data Source.
Note that this class does NOT inherit from DataSourceBase since it is a proxy.
By implementing this as a proxy, most of code for any Data Source concrete implementation can exist as pure C# with no Unity dependencies.
Constructors
| Name | Description |
|---|---|
| DataSourceGOBase() | |
Fields
| Name | Description |
|---|---|
| dataSourceType | |
| keyPathMapper | |
Properties
| Name | Description |
|---|---|
| DataController |
An optional data controller. |
| DataSource | |
| DataSourceType |
Get the data source type |
Methods
| Name | Description |
|---|---|
| AddDataConsumerListener(String, IDataConsumer) |
Add a new data consumer listener for the specified key path |
| AllocateDataSource() |
Allocate the correct data source |
| DataChangeSetBegin() |
Begin a data change set. |
| DataChangeSetEnd() |
End a data change set. |
| GetCollectionCount(String) |
If a key path represents a collection, return the number of items in that collection. |
| GetCollectionKeyPathRange(String, Int32, Int32) |
Get an enumerable collection of key path strings for the specified collection index range. |
| GetDataSource(String) |
IDataSourceProvider method to get this data source. |
| GetDataSourceTypes() |
Get an array of data source types that can be provided by this provider |
| GetNthCollectionKeyPathAt(String, Int32) |
If a key path represents a collection, return a collection key path for the entry at index |
| GetValue(String) |
Get the value associated with the specified key path and prefix |
| InitializeDataSource() | UnityEngine.MonoBehaviour.InitializeDataSource |
| IsCollectionAtKeyPath(String) |
Determine if key path represents a data collection |
| IsDataAvailable() |
Is data available in the data source. |
| NotifyAllChanged(DataChangeType, IDataConsumer) |
Notify all listeners that data has changed. |
| NotifyDataChanged(String, Object, DataChangeType, Boolean) |
Inform data source that its data has changed. |
| RemoveDataConsumerListener(String, IDataConsumer) |
Remove a data consumer listener for the specified key path |
| ResolveKeyPath(String, String) |
Resolve a key path using a given prefix and local path. |
| SetDataKeyPathMapper(IDataKeyPathMapper) |
Set a key path mapper. |
| SetValue(String, Object, Boolean) |
Set the value associated with the specified key path |