HoloLens 2 Gait Training
The purpose of this project is to create gait training application.
Loading...
Searching...
No Matches
SingletonMonobehaviour.cs
Go to the documentation of this file.
1
using
UnityEngine;
2
8
public
class
SingletonMonobehaviour
<T> : MonoBehaviour where T : MonoBehaviour
9
{
10
private
static
T
g_Instance
;
11
12
public
static
T
Instance
{
get
=>
g_Instance
; }
13
14
protected
virtual
void
Awake
()
15
{
16
if
(
g_Instance
==
null
)
17
{
18
g_Instance
=
this
as T;
19
}
20
else
21
{
22
Destroy( gameObject );
23
}
24
}
25
}
SingletonMonobehaviour
Abstract class that inherited by all the game managers. All the game managers use singleton since gam...
Definition:
SingletonMonobehaviour.cs:9
SingletonMonobehaviour.g_Instance
static T g_Instance
Definition:
SingletonMonobehaviour.cs:10
SingletonMonobehaviour.Awake
virtual void Awake()
Definition:
SingletonMonobehaviour.cs:14
SingletonMonobehaviour.Instance
static T Instance
Definition:
SingletonMonobehaviour.cs:12
Assets
_HoloLens_Avatar
Scripts
Runtime
SingletonMonobehaviour.cs
Generated on Wed May 31 2023 22:32:57 for HoloLens 2 Gait Training by
1.9.5