Haply::Inverse::Unity::Singleton
A generic singleton class for MonoBehaviour. More...
Inherits from MonoBehaviour
Public Functions
Name | |
---|---|
void | InitializeInstance() Initializes the singleton instance. |
bool | Exists() |
Protected Functions
Name | |
---|---|
virtual void | OnDestroy() |
virtual void | OnApplicationQuit() |
Public Properties
Name | |
---|---|
T | Instance Gets the instance of the singleton class. |
Detailed Description
template <T >
class Haply::Inverse::Unity::Singleton;
A generic singleton class for MonoBehaviour.
Template Parameters:
- T Type of the singleton class.
Public Functions Documentation
function InitializeInstance
static void InitializeInstance()
Initializes the singleton instance.
Call this method from the main thread during initialization (e.g., in an Awake method).
function Exists
static bool Exists()
Protected Functions Documentation
function OnDestroy
virtual void OnDestroy()
Reimplemented by: Haply::Inverse::Unity::DeviceMapper::OnDestroy
function OnApplicationQuit
virtual void OnApplicationQuit()
Public Property Documentation
property Instance
static T Instance;
Gets the instance of the singleton class.