API reference
API reference
Select your platform
No SDKs available
No versions available

SingletonMonoBehaviour Class

Extends MonoBehaviour
A base class for creating singleton MonoBehaviours that can be instantiated in code or as part of the scene.


If unspecified, SingletonMonoBehaviours are destroyed when a scene change occurs.
Use the SingletonMonoBehaviour.InstantiationSettings attribute to change the DontDestroyOnLoad behaviour.
Consider setting [DefaultExecutionOrder(-1)] on the derived class.

Properties

The reference to the singleton instance.
Did you find this page helpful?
Thumbs up icon
Thumbs down icon