Click or drag to resize

MonoSingletonT Class

The convenience base class for singleton objects.
Inheritance Hierarchy
SystemObject
  Object
    Component
      Behaviour
        MonoBehaviour
          RavingBots.MagicGestures.UtilsMonoSingletonT
            RavingBots.MagicGestures.AIGestureLearner
            RavingBots.MagicGestures.ControllerWandManager
            RavingBots.MagicGestures.GameMagicGame
            RavingBots.MagicGestures.UIMagicMenu
            RavingBots.MagicGestures.Utils.ObjectPoolingGameObjectPoolRoot

Namespace:  RavingBots.MagicGestures.Utils
Assembly:  Assembly-CSharp (in Assembly-CSharp.dll) Version: 0.0.0.0
Syntax
C#
public class MonoSingleton<T> : MonoBehaviour
where T : MonoBehaviour

Type Parameters

T
The type of the object.

The MonoSingletonT type exposes the following members.

Constructors
  NameDescription
Public methodMonoSingletonT
Initializes a new instance of the MonoSingletonT class
Top
Properties
  NameDescription
Public propertyStatic memberAutoInstance
The instance of the object.
Public propertyStatic memberInstance
The instance of the object, if not created yet.
Top
Methods
  NameDescription
Protected methodAwake
Set Instance.
Protected methodOnDestroy
Clear registered Instance.
Top
Remarks
This class is used as a base for objects that must not be duplicated on the scene. For convenience it also provides an easy access to the only instance.
See Also