Exemplo n.º 1
0
 private void Awake()
 {
     if (Instancia != null && Instancia != this)
     {
         gameObject.SetActive(false);
         return;
     }
     Instancia = this;
     DontDestroyOnLoad(gameObject);
 }
Exemplo n.º 2
0
 private void Awake()
 {
     if (Instance != null && Instance != this)
     {
         Destroy(gameObject);
         return;
     }
     Instance = this;
     DontDestroyOnLoad(gameObject);
 }