Exemplo n.º 1
0
        private void Awake()
        {
            if (s_Instance != null && s_Instance != this)
            {
                Destroy(gameObject);
            }

            s_Instance = this;
            DontDestroyOnLoad(gameObject);
        }
Exemplo n.º 2
0
 void OnApplicationQuit()
 {
     s_Instance = null;
 }