protected static void UnloadDependencies(string assetBundleName) { string[] array = null; if (!AssetBundleManager.m_Dependencies.TryGetValue(assetBundleName, out array)) { return; } foreach (string assetBundleName2 in array) { AssetBundleManager.UnloadAssetBundleInternal(assetBundleName2); } AssetBundleManager.m_Dependencies.Remove(assetBundleName); }
public static void UnloadAssetBundle(string assetBundleName) { AssetBundleCreateRequest assetBundleCreateRequest; if (AssetBundleManager.m_DownloadingReqs.TryGetValue(assetBundleName, out assetBundleCreateRequest)) { Dictionary<string, int> downloadingTicks; if (((downloadingTicks = AssetBundleManager.m_DownloadingTicks)[assetBundleName] = downloadingTicks[assetBundleName] - 1) <= 0) { AssetBundleManager.m_DownloadingTicks[assetBundleName] = 0; } } else { AssetBundleManager.UnloadAssetBundleInternal(assetBundleName); } }