Beispiel #1
0
 /// <summary>
 /// Application_quitting
 /// </summary>
 void OnApplication_quitting()
 {
     Time.timeScale = 0;
     StrayFogGamePools.assetBundleManager.Dispose();
     StrayFogConfigHelper.CloseSQLite();
     StrayFogConfigHelper.SaveExcelPackage();
     AssetBundle.UnloadAllAssetBundles(true);
     GameObject[] gos = SceneManager.GetActiveScene().GetRootGameObjects();
     if (gos != null && gos.Length > 0)
     {
         foreach (GameObject g in gos)
         {
             if (g != null)
             {
                 GameObject.Destroy(g);
             }
         }
     }
     mQuitAppAsyncOperation = Resources.UnloadUnusedAssets();
     Time.timeScale         = 1;
     coroutine.StartCoroutine(OnWaitQuitApp());
 }