Beispiel #1
0
 // Use this for initialization
 void Awake()
 {
     if (instance != null)
     {
         Destroy(gameObject);
         return;
     }
     instance   = this;
     gameCamera = Camera.main;
 }
Beispiel #2
0
 void OnDestroy()
 {
     instance = null;
 }