Singleton
Last updated
Last updated
namespace:
Inherits: MonoBehaviour
Base class for simple scene-contained Singletons.
public static T Instance
: The instance of T
in the scene. It may also be null if there are no instances in the scene.
protected virtual void Awake()
: enforces Singleton pattern.
protected virtual void OnDestroy()
: sets T.Instance
to null.