Exemplo n.º 1
0
 private void OnDestroy()
 {
     if (Instance == this)
     {
         Instance = null;
     }
 }
Exemplo n.º 2
0
 private void Awake()
 {
     if (Instance)
     {
         Debug.LogWarning("LobbyLevel already in scene! Deleting this gameobject!");
         Destroy(gameObject);
         return;
     }
     Instance = this;
 }