Unity - Scripting API: Caching.ClearCache
Success!
Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.
Submission failed
For some reason your suggested change could not be submitted. Please <a>try again</a> in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.
Declaration
public static bool ClearCache();
Declaration
public static bool ClearCache(int expiration);
Parameters
| Parameter | Description |
|---|---|
| expiration | The number of seconds that AssetBundles may remain unused in the cache. |
Returns
bool True when cache clearing succeeded, false if cache was in use.
Description
Removes all AssetBundle content that has been cached by the current application.
This method is not available to WebPlayer applications that use the shared cache.
Additional resources: Downloading Asset Bundles.
Web player is not supported from 5.4.0 and beyond.