Difference between revisions of "Cache Protocol"
From PowerUI
(Created page with "The cache:// protocol is used with the static ImageCache class (scripting). It lets you name a Texture (either a RenderTexture or a Texture2D) and display it on the UI: <synt...") |
|||
Line 1: | Line 1: | ||
− | The cache:// protocol | + | The cache:// protocol was used with the static ImageCache class (scripting). It's been depreciated in favour of just using anElement.image=theTexture instead. It lets you name a Texture (either a RenderTexture or a Texture2D) and display it on the UI: |
<syntaxhighlight lang="csharp"> | <syntaxhighlight lang="csharp"> |
Latest revision as of 15:05, 30 October 2017
The cache:// protocol was used with the static ImageCache class (scripting). It's been depreciated in favour of just using anElement.image=theTexture instead. It lets you name a Texture (either a RenderTexture or a Texture2D) and display it on the UI:
// Texture2D aTexture;
ImageCache.Add("myTexture",aTexture);
<!-- Here's how you display it -->
<img src='cache://myTexture'/>