Show / Hide Table of Contents

Class Caching

Inheritance
Object
Caching
Inherited Members
Object.ToString()
Object.Equals(Object)
Object.Equals(Object, Object)
Object.ReferenceEquals(Object, Object)
Object.GetHashCode()
Object.GetType()
Object.MemberwiseClone()
Namespace: UnityEngine
Assembly: UnityEngine.dll
Syntax
public sealed class Caching

Properties

cacheCount

Declaration
public static int cacheCount { get; }
Property Value
Type Description
Int32

compressionEnabled

Declaration
public static bool compressionEnabled { get; set; }
Property Value
Type Description
Boolean

currentCacheForWriting

Declaration
public static Cache currentCacheForWriting { get; set; }
Property Value
Type Description
Cache

defaultCache

Declaration
public static Cache defaultCache { get; }
Property Value
Type Description
Cache

expirationDelay

Declaration
[Obsolete("This property is only used for the current cache, use Cache.expirationDelay to access the expiration delay per cache.")]
public static int expirationDelay { get; set; }
Property Value
Type Description
Int32

maximumAvailableDiskSpace

Declaration
[Obsolete("This property is only used for the current cache, use Cache.maximumAvailableStorageSpace to access the maximum available storage space per cache.")]
public static long maximumAvailableDiskSpace { get; set; }
Property Value
Type Description
Int64

ready

Declaration
public static bool ready { get; }
Property Value
Type Description
Boolean
| Improve this Doc View Source

spaceAvailable

Declaration
[Obsolete("Please use use Cache.spaceOccupied to get used bytes per cache.")]
public static int spaceAvailable { get; }
Property Value
Type Description
Int32

spaceFree

Declaration
[Obsolete("This property is only used for the current cache, use Cache.spaceFree to get unused bytes per cache.")]
public static long spaceFree { get; }
Property Value
Type Description
Int64

spaceOccupied

Declaration
[Obsolete("This property is only used for the current cache, use Cache.spaceOccupied to get used bytes per cache.")]
public static long spaceOccupied { get; }
Property Value
Type Description
Int64
| Improve this Doc View Source

spaceUsed

Declaration
[Obsolete("Please use use Cache.spaceOccupied to get used bytes per cache.")]
public static int spaceUsed { get; }
Property Value
Type Description
Int32

Methods

| Improve this Doc View Source

AddCache(String)

Declaration
public static Cache AddCache(string cachePath)
Parameters
Type Name Description
String cachePath
Returns
Type Description
Cache
| Improve this Doc View Source

CleanCache()

Declaration
[Obsolete("This function is obsolete. Please use ClearCache.  (UnityUpgradable) -> ClearCache()")]
public static bool CleanCache()
Returns
Type Description
Boolean
| Improve this Doc View Source

ClearAllCachedVersions(String)

Declaration
public static bool ClearAllCachedVersions(string assetBundleName)
Parameters
Type Name Description
String assetBundleName
Returns
Type Description
Boolean

ClearCache()

Declaration
public static bool ClearCache()
Returns
Type Description
Boolean
| Improve this Doc View Source

ClearCache(Int32)

Declaration
public static bool ClearCache(int expiration)
Parameters
Type Name Description
Int32 expiration
Returns
Type Description
Boolean
| Improve this Doc View Source

ClearCachedVersion(String, Hash128)

Declaration
public static bool ClearCachedVersion(string assetBundleName, Hash128 hash)
Parameters
Type Name Description
String assetBundleName
Hash128 hash
Returns
Type Description
Boolean
| Improve this Doc View Source

ClearOtherCachedVersions(String, Hash128)

Declaration
public static bool ClearOtherCachedVersions(string assetBundleName, Hash128 hash)
Parameters
Type Name Description
String assetBundleName
Hash128 hash
Returns
Type Description
Boolean
| Improve this Doc View Source

GetAllCachePaths(List<String>)

Declaration
public static void GetAllCachePaths(List<string> cachePaths)
Parameters
Type Name Description
List<String> cachePaths

GetCacheAt(Int32)

Declaration
public static Cache GetCacheAt(int cacheIndex)
Parameters
Type Name Description
Int32 cacheIndex
Returns
Type Description
Cache

GetCacheByPath(String)

Declaration
public static Cache GetCacheByPath(string cachePath)
Parameters
Type Name Description
String cachePath
Returns
Type Description
Cache
| Improve this Doc View Source

GetCachedVersions(String, List<Hash128>)

Declaration
public static void GetCachedVersions(string assetBundleName, List<Hash128> outCachedVersions)
Parameters
Type Name Description
String assetBundleName
List<Hash128> outCachedVersions
| Improve this Doc View Source

GetVersionFromCache(String)

Declaration
[Obsolete("This function is obsolete and will always return -1. Use IsVersionCached instead.")]
public static int GetVersionFromCache(string url)
Parameters
Type Name Description
String url
Returns
Type Description
Int32
| Improve this Doc View Source

IsVersionCached(String, Int32)

Declaration
[Obsolete("Please use IsVersionCached with Hash128 instead.")]
public static bool IsVersionCached(string url, int version)
Parameters
Type Name Description
String url
Int32 version
Returns
Type Description
Boolean
| Improve this Doc View Source

IsVersionCached(String, Hash128)

Declaration
public static bool IsVersionCached(string url, Hash128 hash)
Parameters
Type Name Description
String url
Hash128 hash
Returns
Type Description
Boolean
| Improve this Doc View Source

IsVersionCached(CachedAssetBundle)

Declaration
public static bool IsVersionCached(CachedAssetBundle cachedBundle)
Parameters
Type Name Description
CachedAssetBundle cachedBundle
Returns
Type Description
Boolean
| Improve this Doc View Source

MarkAsUsed(String, Int32)

Declaration
[Obsolete("Please use MarkAsUsed with Hash128 instead.")]
public static bool MarkAsUsed(string url, int version)
Parameters
Type Name Description
String url
Int32 version
Returns
Type Description
Boolean
| Improve this Doc View Source

MarkAsUsed(String, Hash128)

Declaration
public static bool MarkAsUsed(string url, Hash128 hash)
Parameters
Type Name Description
String url
Hash128 hash
Returns
Type Description
Boolean
| Improve this Doc View Source

MarkAsUsed(CachedAssetBundle)

Declaration
public static bool MarkAsUsed(CachedAssetBundle cachedBundle)
Parameters
Type Name Description
CachedAssetBundle cachedBundle
Returns
Type Description
Boolean

MoveCacheAfter(Cache, Cache)

Declaration
public static void MoveCacheAfter(Cache src, Cache dst)
Parameters
Type Name Description
Cache src
Cache dst

MoveCacheBefore(Cache, Cache)

Declaration
public static void MoveCacheBefore(Cache src, Cache dst)
Parameters
Type Name Description
Cache src
Cache dst

RemoveCache(Cache)

Declaration
public static bool RemoveCache(Cache cache)
Parameters
Type Name Description
Cache cache
Returns
Type Description
Boolean

Extension Methods

MustExtensions.MustBeEqual<T>(T, T)
MustExtensions.MustBeEqual<T>(T, T, String)
MustExtensions.MustNotBeEqual<T>(T, T)
MustExtensions.MustNotBeEqual<T>(T, T, String)
MustExtensions.MustBeNull<T>(T)
MustExtensions.MustBeNull<T>(T, String)
MustExtensions.MustNotBeNull<T>(T)
MustExtensions.MustNotBeNull<T>(T, String)
  • Improve this Doc
  • View Source
Back to top Generated by DocFX