Esempio n. 1
0
 void Singleton()
 {
     if (instance != null)
     {
         Destroy(gameObject);
     }
     else
     {
         instance = this;
         DontDestroyOnLoad(instance); //sahneler arası geçişte çalmaya devam etsin
     }
 }
Esempio n. 2
0
 // Update is called once per frame
 void Singleton()
 {
     if (instance != null)
     {
         Destroy(gameObject);
     }
     else
     {
         instance = this;
         DontDestroyOnLoad(instance);
     }
 }
Esempio n. 3
0
 void TekYap()
 {
     if (ornek != null)
     {
         Destroy(gameObject);
     }
     else
     {
         ornek = this;
         DontDestroyOnLoad(gameObject);
     }
 }