Skip to content

Class: SingletonBehaviour<T> ​

csharp
public class SingletonBehaviour<T> : MonoBehaviour where T : MonoBehaviour

Properties ​

NameDeclarationDescription
instancepublic static T instance { get; }If you expect the instance to be null, you MUST USE softInstance in Update loops.This will call FindObjectOfType if current instance is null, which can be very expensive.
softInstancepublic static T softInstance { get; }

Methods ​

Awake() ​

csharp
protected virtual void Awake()

Maintained by the Shape of Dreams Modding Community