Version: 2017.1 (switch to 2017.2b)
LanguageEnglish
  • C#
  • JS

Script language

Select your preferred scripting language. All code snippets will be displayed in this language.

Caching

class in UnityEngine

Suggest a change

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.

Close

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.

Close

Cancel

Description

The Caching class lets you manage cached AssetBundles, downloaded using WWW.LoadFromCacheOrDownload.

Static Variables

cacheCountReturns the cache count in the cache list.
compressionEnabledControls compression of cache data. Enabled by default.
currentCacheForWritingReturns the current cache in which AssetBundles should be cached.
defaultCacheReturns the default cache which is added by Unity internally.
readyIs caching ready?

Static Functions

AddCacheAdd a cache with the given path.
ClearAllCachedVersionsRemoves all the cached versions of the given AssetBundle from the cache.
ClearCacheRemoves all AssetBundle and Procedural Material content that has been cached by the current application.
ClearCachedVersionRemoves the given version of the AssetBundle.
ClearOtherCachedVersionsRemoves all the cached versions of the AssetBundle from the cache, except for the specified version.
GetAllCachePathsReturns all paths of the cache in the cache list.
GetCacheAtReturns the Cache at the given position in the cache list.
GetCacheByPathReturns the Cache that has the given cache path.
GetCachedVersionsReturns all cached versions of the given AssetBundle.
IsVersionCachedChecks if an AssetBundle is cached.
MarkAsUsedBumps the timestamp of a cached file to be the current time.
MoveCacheAfterMoves the source Cache after the destination Cache in the cache list.
MoveCacheBeforeMoves the source Cache before the destination Cache in the cache list.
RemoveCacheRemoves the Cache from cache list.