static void OnApplicationQuit() { AutoSaveTiming timing = UniDataSettings.Instance.AutoSaveTiming; if (timing.HasFlag(AutoSaveTiming.OnApplicationQuit)) { Save(); } }
static void OnApplicationPaused(bool paused) { if (!paused) { return; } AutoSaveTiming timing = UniDataSettings.Instance.AutoSaveTiming; if ( timing.HasFlag(AutoSaveTiming.OnApplicationPause) || Application.isMobilePlatform && timing.HasFlag(AutoSaveTiming.OnApplicationQuit) ) { Save(); } }