A singleton designed to help child singletons take certain actions only after Start has been called.
More...
|
| 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...
|
| |
| 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...
|
| |
|
| bool | IsStarted [get] |
| |
| 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...
|
| |
A singleton designed to help child singletons take certain actions only after Start has been called.
Definition at line 13 of file StartAwareSingleton.cs.
§ OnDisable()
§ 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.
Definition at line 59 of file StartAwareSingleton.cs.
§ OnEnable()
§ 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.
Definition at line 49 of file StartAwareSingleton.cs.
§ Start()
§ IsStarted
The documentation for this class was generated from the following file: