Class ComponentSingleton<T>
Creates a singleton.
Inherited Members
Namespace: UnityEngine.ResourceManagement.Util
Syntax
[ExecuteInEditMode]
public abstract class ComponentSingleton<T> : MonoBehaviour where T : ComponentSingleton<T>
Type Parameters
Name | Description |
---|---|
T | The singleton type. |
Properties
Exists
Indicates whether or not there is an existing instance of the singleton.
Declaration
public static bool Exists { get; }
Property Value
Type | Description |
---|---|
Boolean |
Instance
Stores the instance of the singleton.
Declaration
public static T Instance { get; }
Property Value
Type | Description |
---|---|
T |
Methods
DestroySingleton()
Destroys the singleton.
Declaration
public static void DestroySingleton()
GetGameObjectName()
Retrieves the name of the object.
Declaration
protected virtual string GetGameObjectName()
Returns
Type | Description |
---|---|
String | Returns the name of the object. |