Detailed Description

Caches AssetBundles by their original URI. Generally you'd use the rather weird looking bundle URI schema bundle://https://cdn.yoursite.com/.. instead of using this directly. (That URI would result in an entry here with an address of "https://cdn...").

Static Public Member Functions

static void Add (string address, AssetBundle bundle)
 Adds a bundle to the cache. More...
 
static AssetBundle Get (string address)
 Gets a named bundle from the cache. More...
 
static void Remove (string address)
 Removes a bundle from the cache. More...
 
static void Clear ()
 Clears the cache of all its contents. More...
 

Static Public Attributes

static Dictionary< string,
DataPackage
Loading =new Dictionary<string,DataPackage>()
 Bundles loading. More...
 

Static Private Attributes

static Dictionary< string,
AssetBundle > 
Lookup =new Dictionary<string,AssetBundle>()
 The set of all cached bundles. More...
 

Member Function Documentation

static void PowerUI.Bundles.Add ( string  address,
AssetBundle  bundle 
)
inlinestatic

Adds a bundle to the cache.

Parameters
addressThe name to use to find your bundle.
bundleThe bundle to store in the cache.
static void PowerUI.Bundles.Clear ( )
inlinestatic

Clears the cache of all its contents.

static AssetBundle PowerUI.Bundles.Get ( string  address)
inlinestatic

Gets a named bundle from the cache.

Parameters
addressThe name of the bundle to find.
Returns
A Texture2D if it's found; null otherwise.
static void PowerUI.Bundles.Remove ( string  address)
inlinestatic

Removes a bundle from the cache.

Parameters
addressThe name of the bundle to remove.

Member Data Documentation

Dictionary<string,DataPackage> PowerUI.Bundles.Loading =new Dictionary<string,DataPackage>()
static

Bundles loading.

Dictionary<string,AssetBundle> PowerUI.Bundles.Lookup =new Dictionary<string,AssetBundle>()
staticprivate

The set of all cached bundles.