There may be times when you want to display an image for which you only have the Texture2D object, a RenderTexture or an SPA file. In this case, you can add it to the cache with a given name and then access it in PowerUI using cache://theNameYouUsed. The most useful method for this is PowerUI.ImageCache.Add. This avoids having to serialize the image and unserialize it again (i.e. as with the data:// URLs).
Static Public Member Functions | |
static void | Add (string address, Texture image) |
Adds an image to the cache. Texture2D or RenderTexture. More... | |
static void | Add (string address, ImageFormat image) |
Adds an image to the cache. Used by e.g. SPA etc. More... | |
static ImageFormat | Get (string address) |
Gets a named image from the cache. More... | |
static void | Remove (string address) |
Removes an image from the cache. More... | |
static void | Clear () |
Clears the cache of all its contents. More... | |
Static Private Attributes | |
static Dictionary< string, ImageFormat > | Lookup =new Dictionary<string,ImageFormat>() |
The set of all cached textures. More... | |
|
inlinestatic |
Adds an image to the cache. Texture2D or RenderTexture.
address | The name to use to find your image. |
image | The image to store in the cache. |
|
inlinestatic |
Adds an image to the cache. Used by e.g. SPA etc.
address | The name to use to find your image. |
image | The image to store in the cache. |
|
inlinestatic |
Clears the cache of all its contents.
|
inlinestatic |
Gets a named image from the cache.
address | The name of the image to find. |
|
inlinestatic |
Removes an image from the cache.
address | The name of the image to remove. |
|
staticprivate |
The set of all cached textures.