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