Beispiel #1
0
 private void Singleton()
 {
     if (Instancia != null && Instancia != this)
     {
         Destroy(gameObject);
     }
     else
     {
         Instancia = this;
         DontDestroyOnLoad(gameObject);
     }
 }