AR Design
UBC EML collab with UBC SALA - visualizing IoT data in AR
HoloToolkit.Unity.StartAwareSingleton< T > Class Template Reference

A singleton designed to help child singletons take certain actions only after Start has been called. More...

Inheritance diagram for HoloToolkit.Unity.StartAwareSingleton< T >:
HoloToolkit.Unity.Singleton< T >

Protected Member Functions

virtual void OnEnable ()
 
virtual void OnDisable ()
 
virtual void Start ()
 
virtual void OnEnableAfterStart ()
 This method is similar to Unity's OnEnable method, except that it's called only after Start. This means all Singleton<T> classes will have had a chance to run their Awake methods and Singleton<T>.Instance will be safe to use. More...
 
virtual void OnDisableAfterStart ()
 This method is similar to Unity's OnDisable method, except that it's called only after Start. This means all Singleton<T> classes will have had a chance to run their Awake methods and Singleton<T>.Instance will be safe to use. More...
 
- Protected Member Functions inherited from HoloToolkit.Unity.Singleton< T >
virtual void Awake ()
 Base Awake method that sets the Singleton's unique instance. Called by Unity when initializing a MonoBehaviour. Scripts that extend Singleton should be sure to call base.Awake() to ensure the static Instance reference is properly created. More...
 
virtual void OnDestroy ()
 Base OnDestroy method that destroys the Singleton's unique instance. Called by Unity when destroying a MonoBehaviour. Scripts that extend Singleton should be sure to call base.OnDestroy() to ensure the underlying static Instance reference is properly cleaned up. More...
 

Properties

bool IsStarted [get]
 
- Properties inherited from HoloToolkit.Unity.Singleton< T >
static T Instance [get]
 Returns the Singleton instance of the classes type. If no instance is found, then we search for an instance in the scene. If more than one instance is found, we throw an error and no instance is returned. More...
 
static bool IsInitialized [get]
 Returns whether the instance has been initialized or not. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from HoloToolkit.Unity.Singleton< T >
static void AssertIsInitialized ()
 
static bool ConfirmInitialized ()
 Awake and OnEnable safe way to check if a Singleton is initialized. More...
 

Detailed Description

A singleton designed to help child singletons take certain actions only after Start has been called.

Type Constraints
T :StartAwareSingleton<T> 

Definition at line 13 of file StartAwareSingleton.cs.

Member Function Documentation

§ OnDisable()

virtual void HoloToolkit.Unity.StartAwareSingleton< T >.OnDisable ( )
protectedvirtual

Definition at line 26 of file StartAwareSingleton.cs.

§ OnDisableAfterStart()

virtual void HoloToolkit.Unity.StartAwareSingleton< T >.OnDisableAfterStart ( )
protectedvirtual

This method is similar to Unity's OnDisable method, except that it's called only after Start. This means all Singleton<T> classes will have had a chance to run their Awake methods and Singleton<T>.Instance will be safe to use.

Definition at line 59 of file StartAwareSingleton.cs.

§ OnEnable()

virtual void HoloToolkit.Unity.StartAwareSingleton< T >.OnEnable ( )
protectedvirtual

Definition at line 18 of file StartAwareSingleton.cs.

§ OnEnableAfterStart()

virtual void HoloToolkit.Unity.StartAwareSingleton< T >.OnEnableAfterStart ( )
protectedvirtual

This method is similar to Unity's OnEnable method, except that it's called only after Start. This means all Singleton<T> classes will have had a chance to run their Awake methods and Singleton<T>.Instance will be safe to use.

Definition at line 49 of file StartAwareSingleton.cs.

§ Start()

virtual void HoloToolkit.Unity.StartAwareSingleton< T >.Start ( )
protectedvirtual

Definition at line 34 of file StartAwareSingleton.cs.

Property Documentation

§ IsStarted

bool HoloToolkit.Unity.StartAwareSingleton< T >.IsStarted
getprotected

Definition at line 42 of file StartAwareSingleton.cs.


The documentation for this class was generated from the following file: