Exemplo n.º 1
0
 void Awake() //0.0.30N3
 {
     if (essentialInstance == null)
     {
         essentialInstance = this;
     }
     else
     {
         Destroy(gameObject);
     }
 } //0.0.30N3end
Exemplo n.º 2
0
 void Awake()
 {
     if (instance == null)
     {
         instance = this;
     }
     else
     {
         Destroy(gameObject);
     }
 }
 void Awake()
 {
     //Singleton Setup
     if (instance == null)
     {
         instance = this;
     }
     else
     {
         Destroy(gameObject);
     }
     DontDestroyOnLoad(gameObject);
 }