Corgi Engine
v9.1
|
Persistent humble singleton, basically a classic singleton but will destroy any other older components of the same type it finds on awake More...
Public Attributes | |
float | InitializationTime |
the timestamp at which this singleton got initialized More... | |
Static Public Attributes | |
static bool | HasInstance => _instance != null |
whether or not this singleton already has an instance More... | |
static T | Current => _instance |
Protected Member Functions | |
virtual void | Awake () |
On awake, we check if there's already a copy of the object in the scene. If there's one, we destroy it. More... | |
virtual void | InitializeSingleton () |
Initializes the singleton. More... | |
Static Protected Attributes | |
static T | _instance |
Properties | |
static T | Instance [get] |
Singleton design pattern More... | |
Persistent humble singleton, basically a classic singleton but will destroy any other older components of the same type it finds on awake
T | : | Component |
|
protectedvirtual |
On awake, we check if there's already a copy of the object in the scene. If there's one, we destroy it.
|
protectedvirtual |
Initializes the singleton.
|
staticprotected |
|
static |
|
static |
whether or not this singleton already has an instance
float MoreMountains.Tools.MMPersistentHumbleSingleton< T >.InitializationTime |
the timestamp at which this singleton got initialized
|
staticget |
Singleton design pattern
The instance.