Language
Edit

DataSourceProviderSingleton Class

Definition

Inherit from this base class to create a singleton.

[UnityEngine.AddComponentMenu("MRTK/Data Binding/Sources/Data Source Provider Singleton")]
[System.Serializable]
public class DataSourceProviderSingleton : UnityEngine.MonoBehaviour, MixedReality.Toolkit.Data.IDataSourceProvider
[<UnityEngine.AddComponentMenu("MRTK/Data Binding/Sources/Data Source Provider Singleton")>]
[<System.Serializable>]
type DataSourceProviderSingleton = class
    inherit MonoBehaviour
    interface IDataSourceProvider
Public Class DataSourceProviderSingleton
Inherits MonoBehaviour
Implements IDataSourceProvider
Inheritance
UnityEngine.MonoBehaviour
DataSourceProviderSingleton
Attributes
UnityEngine.AddComponentMenuAttribute SerializableAttribute
Implements

Examples

An example usage may look like:

public class MyClassName : Singleton<MyClassName> {}

Constructors

Name Description
DataSourceProviderSingleton()

Fields

Name Description
_instance

Properties

Name Description
Instance

Access singleton instance through this propriety.

IsInitialized

Indicates if the singleton has been initialized and ready to go

Methods

Name Description
Awake()

A Unity event function that is called when an enabled script instance is being loaded.

GetDataSource(String)

Get a datasource for a specific data source type

GetDataSourceTypes()

Get an array of data source types that can be provided by this provider

OnDestroy()

A Unity event function that is called when the script component has been destroyed.

Applies to