Наследование: UnityEngine.MonoBehaviour
Пример #1
0
 void Awake()
 {
     if (_instance == null)
     {
         _instance = this;
         DontDestroyOnLoad(gameObject);
     }
     else
     {
         Debug.Log("TinderBoxObject exists, destroying duplicate");
         GameObject.Destroy(gameObject);
     }
 }
Пример #2
0
 void Awake()
 {
     if (_instance == null)
     {
         _instance = this;
         DontDestroyOnLoad(gameObject);
     }
     else
     {
         Debug.Log("TinderBoxObject exists, destroying duplicate");
         GameObject.Destroy(gameObject);
     }
 }