Reputation: 45
Hi I was wondering if it is possible to delete specific cache instead deleting all cached asset bundle using Caching.CleanCache
. Any suggestion if it is possible?
Upvotes: 1
Views: 3709
Reputation: 154
CleanCache is deprecated, use ClearCache to clear all asset bundles.
To remove asset bundle with all cached versions, you can use:
Caching.ClearAllCachedVersions("YourCachedAssetBundleName");
this will removes all the cached versions of the given AssetBundle from the cache or use. (P.S "YourCachedAssetBundleName" must not contain dot '.')
Caching.ClearCachedVersion("YourCachedAssetBundleName", hash);
Removes the given version of the AssetBundle.
Upvotes: 4