Beispiel #1
0
 void OnDestroy()
 {
     if (instance == this)
     {
         instance = null;
     }
 }
Beispiel #2
0
 // Start is called before the first frame update
 void Awake()
 {
     if (instance == null)
     {
         instance = this;
     }
 }