PowerUI.ResourcesProtocol Class Reference

Detailed Description

Handles the resources (default) protocol. Files here are loaded from the Unity 'Resources' folder in the project. Note that animation files must end in .bytes (e.g. animation.spa.bytes) and all images must be read/write enabled as well as have a "To power 2" of none.

Inheritance diagram for PowerUI.ResourcesProtocol:
PowerUI.FileProtocol PowerUI.ResizeProtocol

Public Member Functions

override string[] GetNames ()
 Returns all protocol names:// that can be used for this protocol. e.g. new string[]{"cdn","net"}; => cdn://file.png or net://file.png More...
 
override void OnGetGraphic (ImagePackage package, FilePath path)
 Get the file at the given path as a MovieTexture (Unity Pro only!), Texture2D, SPA Animation or DynamicTexture using this protocol. Once it's been retrieved, this must call package.GotGraphic(theObject) internally. More...
 
override void OnGetData (DataPackage package, FilePath path)
 Get generic binary at the given path using this protocol. Used for e.g. fonts. Once it's been retrieved, this must call package.GotData(theText) internally. More...
 
override void OnGetText (TextPackage package, FilePath path)
 Get the file at the given path as some html text using this protocol. Once it's been retrieved, this must call package.GotText(theText) internally. More...
 
override void OnFollowLink (Element linkElement, FilePath path)
 The user clicked on the given link which points to the given path. More...
 
override bool FullAccess (FilePath path)
 Does the item at the given location have full access to the code security domain? Used by Nitro. If it does not have full access, the Nitro security domain is asked about the path instead. If you're unsure, leave this false! If your game uses simple web browsing, this essentially stops somebody writing dangerous Nitro on a remote webpage and directing your game at it. More...
 
- Public Member Functions inherited from PowerUI.FileProtocol
virtual void OnPostForm (FormData form, Element formElement, FilePath path)
 Submits the given form to the given path using this protocol. More...
 

Private Member Functions

void GotLinkText (TextPackage package)
 

Additional Inherited Members

- Public Attributes inherited from PowerUI.FileProtocol
bool UseResolution =true
 Should images delivered with this protocol append resolution based names? More...
 

Member Function Documentation

override bool PowerUI.ResourcesProtocol.FullAccess ( FilePath  path)
inlinevirtual

Does the item at the given location have full access to the code security domain? Used by Nitro. If it does not have full access, the Nitro security domain is asked about the path instead. If you're unsure, leave this false! If your game uses simple web browsing, this essentially stops somebody writing dangerous Nitro on a remote webpage and directing your game at it.

Reimplemented from PowerUI.FileProtocol.

override string [] PowerUI.ResourcesProtocol.GetNames ( )
inlinevirtual

Returns all protocol names:// that can be used for this protocol. e.g. new string[]{"cdn","net"}; => cdn://file.png or net://file.png

Reimplemented from PowerUI.FileProtocol.

Reimplemented in PowerUI.ResizeProtocol.

void PowerUI.ResourcesProtocol.GotLinkText ( TextPackage  package)
inlineprivate
override void PowerUI.ResourcesProtocol.OnFollowLink ( Element  linkElement,
FilePath  path 
)
inlinevirtual

The user clicked on the given link which points to the given path.

Reimplemented from PowerUI.FileProtocol.

override void PowerUI.ResourcesProtocol.OnGetData ( DataPackage  package,
FilePath  path 
)
inlinevirtual

Get generic binary at the given path using this protocol. Used for e.g. fonts. Once it's been retrieved, this must call package.GotData(theText) internally.

Reimplemented from PowerUI.FileProtocol.

override void PowerUI.ResourcesProtocol.OnGetGraphic ( ImagePackage  package,
FilePath  path 
)
inlinevirtual

Get the file at the given path as a MovieTexture (Unity Pro only!), Texture2D, SPA Animation or DynamicTexture using this protocol. Once it's been retrieved, this must call package.GotGraphic(theObject) internally.

Reimplemented from PowerUI.FileProtocol.

Reimplemented in PowerUI.ResizeProtocol.

override void PowerUI.ResourcesProtocol.OnGetText ( TextPackage  package,
FilePath  path 
)
inlinevirtual

Get the file at the given path as some html text using this protocol. Once it's been retrieved, this must call package.GotText(theText) internally.

Reimplemented from PowerUI.FileProtocol.