Exemple #1
0
        private void Update()
        {
#if UNITY_EDITOR
            if (Input.GetKey(KeyCode.LeftControl) && Input.GetKeyDown(KeyCode.C))
            {
                UserDataManager.Save();
                Debug.LogError("Save");
            }
#endif
        }
        private void OnApplicationPause(bool isPaused)
        {
            Debug.Log($"<color=yellow>OnApplicationPause isPaused = {isPaused}</color>");
#if !UNITY_EDITOR
            if (isPaused)
            {
                UserDataManager.Save();
            }
            else
            {
                if (!UserDataManager.Inited)
                {
                    return;
                }
                UserDataManager.SelectedDate = DateTime.Now;
                Events.OnUpdateTab?.Invoke();
            }
#endif
        }