Method CleanBundleCache
CleanBundleCache(IEnumerable<String>)
Removes any AssetBundles that are no longer referenced in the bundle cache. This can occur when a new, updated catalog excludes entries present in an older catalog.
Declaration
public static AsyncOperationHandle<bool> CleanBundleCache(IEnumerable<string> catalogsIds = null)
Parameters
Type | Name | Description |
---|---|---|
IEnumerable<String> | catalogsIds | The ids of catalogs whose bundle cache entries we want to preserve. If null, entries for all currently loaded catalogs will be preserved. |
Returns
Type | Description |
---|---|
AsyncOperationHandle<Boolean> | The operation handle for the request. Note, that it is user's responsibility to release the returned operation; this can be done before or after the operation completes. |
Remarks
Note, that only AssetBundles loaded through UnityWebRequest are cached. If you want to purge the entire cache, use Caching.ClearCache instead. In the Editor CleanBundleCache should only be called when using the "Use Existing Build (requires built groups)" playmode script as it loads content from bundles.
See AssetBundle caching for more details.