Пример #1
0
 void TekYap()
 {
     if (ornek != null)
     {
         Destroy(gameObject);
     }
     else
     {
         ornek = this;
         DontDestroyOnLoad(gameObject);
     }
 }
Пример #2
0
 private void Awake()
 {
     if (_instance == null)
     {
         _instance = this;
         DontDestroyOnLoad(gameObject);
     }
     else
     {
         Destroy(gameObject);
     }
 }
Пример #3
0
 // Start is called before the first frame update
 void Start()
 {
     pK_Script  = GetComponent <PanelKontrol>();
     sahneGecis = GameObject.Find("SahneManager").GetComponent <SahneGecis>();
 }