/// <summary> /// unload assetbundle and Dependencies false /// </summary> /// <param name="assethashcode"></param> public static bool UnloadDependenciesCacheFalse(int assethashcode) { CacheData cache = TryGetCache(assethashcode); if (cache != null) { int[] alldep = cache.dependencies; CacheData cachetmp = null; cache.Unload(); if (alldep != null) { for (int i = 0; i < alldep.Length; i++) { cachetmp = TryGetCache(alldep[i]); if (cachetmp != null) { cachetmp.Unload(); } } } return(true); } else { #if HUGULA_CACHE_DEBUG Debug.LogWarningFormat("Unload Dependencies Cache False {0} fail is null or locked ", assethashcode); #endif return(false); } }
/// <summary> /// unload assetbundle and Dependencies false /// </summary> /// <param name="assethashcode"></param> public static void UnloadDependenciesCacheFalse(int assethashcode) { CacheData cache = null; caches.TryGetValue(assethashcode, out cache); if (cache != null) { int[] alldep = cache.allDependencies; CacheData cachetmp = null; cache.Unload(); if (alldep != null) { for (int i = 0; i < alldep.Length; i++) { cachetmp = GetCache(alldep[i]); if (cachetmp != null) { cachetmp.Unload(); } } } } else { Debug.LogWarningFormat("UnloadDependenciesCacheFalse {0} fail ", assethashcode); } }
/// <summary> /// unload assetbundle false /// </summary> /// <param name="assetBundleName"></param> public static bool UnloadCacheFalse(int assethashcode) { CacheData cache = TryGetCache(assethashcode); if (cache != null) { cache.Unload(); return(true); } else { return(false); } }
/// <summary> /// unload assetbundle false /// </summary> /// <param name="assetBundleName"></param> public static void UnloadCacheFalse(int assethashcode) { CacheData cache = null; caches.TryGetValue(assethashcode, out cache); if (cache != null) { cache.Unload(); } else { Debug.LogWarningFormat("UnloadCacheFalse {0} fail ", assethashcode); } }