VR Development Framework
v 1.0.0
 All Classes Namespaces Functions Variables Enumerations Enumerator Properties Events Pages
Public Member Functions | Properties | Private Member Functions | Static Private Attributes | List of all members
AVR.Core.Singleton< T > Class Template Reference

Basic class for Singleton classes. Sets a single, static instance of the class to the "Instance" property. More...

Inheritance diagram for AVR.Core.Singleton< T >:
AVR.Core.AVR_Behaviour AVR.Core.AVR_Root

Public Member Functions

virtual void OnApplicationQuit ()
 
- Public Member Functions inherited from AVR.Core.AVR_Behaviour
virtual void OnDestroy ()
 

Properties

static T Instance [get, set]
 

Private Member Functions

void Awake ()
 
void SetInstance ()
 

Static Private Attributes

static T _Instance
 

Additional Inherited Members

- Protected Attributes inherited from AVR.Core.AVR_Behaviour
AVR_PlayerRig playerRig => AVR_PlayerRig.Instance
 The current AVR_PlayerRig instance in the scene More...
 
AVR_Root root => AVR_Root.Instance
 The current AVR_Root instance in the scene More...
 
bool vrEnabled => UnityEngine.XR.XRSettings.enabled
 True if the application is running as a VR/XR application More...
 

Detailed Description

Basic class for Singleton classes. Sets a single, static instance of the class to the "Instance" property.

Template Parameters
TType of the Singleton. Should correspond to the class deriving from this. Example: class Example : Singleton<Example>
Type Constraints
T :AVR_Behaviour 

Definition at line 10 of file Singleton.cs.