SingletonPersistent<T>
Class in Zigurous.Architecture
Inherits from Singleton<T>
Declaration
public abstract class SingletonPersistent<T> : Singleton<T> where T : ComponentDescription
A singleton behavior that ensures only a single instance of a specified type is instantiated in the scene. The singleton will not be destroyed when changing scenes, thus making it persistent.
Type Parameters
| T | The type of component to instantiate. |
Methods
| SetUp | Handles initializing the singleton on Awake. This function should be used in replacement of Awake. |
Inherited
Static Properties
| Instance | The current instance of the class. The instance will be created if it does not already exist. |
| HasInstance | Checks if the singleton has been initialized and an instance is available to use. |