Пример #1
0
        private void Awake()
        {
            if (s_Instance != null && s_Instance != this)
            {
                Destroy(gameObject);
            }

            s_Instance = this;
            DontDestroyOnLoad(gameObject);
        }
Пример #2
0
 void OnApplicationQuit()
 {
     s_Instance = null;
 }