void Awake()
 {
     if(!i) {
         i = this;
         DontDestroyOnLoad(gameObject);
     }else
         Destroy(gameObject);
 }
Exemplo n.º 2
0
 void Awake()
 {
     if (!i)
     {
         i = this;
         DontDestroyOnLoad(gameObject);
     }
     else
     {
         Destroy(gameObject);
     }
 }