Пример #1
0
 // Use this for initialization
 void Awake()
 {
     if (gs == null)
     {
         DontDestroyOnLoad(this.gameObject);
         gs = this;
     }
     else if (gs != this)
     {
         Destroy(gameObject);
     }
 }
Пример #2
0
 void OnApplicationQuit()
 {
     s_instance = null;
 }
Пример #3
0
 void OnApplicationQuit()
 {
     s_instance = null;
 }