![]() |
BomberUnits
...a Unity learning project
|
A base class for all our singletons, which are mainly management behaviours. More...
Inheritance diagram for MonoSingleton< T >:
Collaboration diagram for MonoSingleton< T >:Static Public Member Functions | |
| static T | Get () |
| Singleton access. | |
Protected Member Functions | |
| virtual void | MyAwake () |
| You may override this to have an Awake()-like function. More... | |
Static Protected Attributes | |
| static T | instance |
| Singleton pattern instance. | |
Private Member Functions | |
| void | Awake () |
A base class for all our singletons, which are mainly management behaviours.
It is set to be not destroyed on load and provides the usual static Get() and duplicate destruction. The subclass has to give its own type for the singleton to handle. You have to use MyAwake() instead of Awake() from MonoBehaviour.
| T | : | MonoBehaviour |
Definition at line 9 of file MonoSingleton.cs.
|
inlineprotectedvirtual |
You may override this to have an Awake()-like function.
Only called if this is the first instance as all further instances are destroyed.
Reimplemented in LevelManager, PlayerManager, and GameSettings.
Definition at line 30 of file MonoSingleton.cs.