Get SpatialOS

Sites

Menu

SingletonScriptableObject<TSelf> Class

Namespace: Improbable.Gdk.Core.Editor
GDK package: Core
Source

Base object for a singleton scriptable object.

Type parameters

TSelf : The type to make a singleton scriptable object.

Inheritance

ScriptableObject

Notes

  • This differs from Unity’s ScriptableSingleton in that: null is returned if no instance of TSelf is found. In Unity’s implementation, an instance of TSelf will be created for you.


Static Methods

GetInstance Source
TSelf GetInstance()

Finds the instance of TSelf

Returns:
The instance of TSelf if one exists, null otherwise.

Notes:
  • An error will be logged if more than one instance is found. If more than one instance is found, only the first is returned.


Methods

OnEnable Source
void OnEnable()

OnDisable Source
void OnDisable()

IsAnAsset Source
bool IsAnAsset()

Search results

Was this page helpful?

Thanks for letting us know!

Thanks for your feedback

Need more help? Ask on the forums