Documentation

Unity Engine

Download Unity

Unity Engine

Cache

Data structure for cache. For more information, see Caching.AddCache.
Read time 1 minuteLast updated 3 days ago

Definition

public struct Cache : IEquatable<Cache>

Remarks

Note: The Cache API is not supported in WebGL because AssetBundles are stored in the browser cache for the WebGL platform.

Properties

Property

Description

indexReturns the index of the cache in the cache list.
maximumAvailableStorageSpaceThe maximum number of bytes that the AssetBundles stored in this cache can occupy.
pathReturns the path of the cache.
readOnlyReturns true if the cache is readonly.
readyReturns true if the cache is ready.
spaceFreeThe number of bytes left in this cache before it reaches Cache.maximumAvailableStorageSpace.
spaceOccupiedReturns the used disk space in bytes.
validReturns true if the cache is valid.

Methods

Method

Description

ClearCacheDeletes all the AssetBundles stored in this cache.