コード例 #1
0
 public void ClearCachesAndFreeMemory(int severity)
 {
     UnityEngine.Debug.LogWarning(string.Format("Clearing Caches; this will force assets to be reloaded off disk and may be slow! {0}", severity));
     if (StoreManager.Get() != null)
     {
         StoreManager.Get().UnloadAndFreeMemory();
     }
     if (severity > 15)
     {
         if (SpellCache.Get() != null)
         {
             SpellCache.Get().Clear();
         }
         AssetCache.ClearAllCaches(true, false);
     }
     ApplicationMgr.Get().UnloadUnusedAssets();
 }
コード例 #2
0
 public void UnloadAllCaches(bool clearPersistent = false, bool clearLoading = true)
 {
     AssetCache.ClearAllCaches(clearPersistent, clearLoading);
     this.FreeMemory();
 }