Ejemplo n.º 1
0
 void Start()
 {
     if (instance)
     {
         Destroy(gameObject);
     }
     else
     {
         instance = this;
         DontDestroyOnLoad(gameObject);
     }
 }
Ejemplo n.º 2
0
 void OnApplicationQuit()
 {
     instance = null;
 }