Class:ContentProvider

From OpenBlox
Jump to: navigation, search
ContentProvider
Inheritance
Instance

The ContentProvider class allows developers to Preload, get and overwrite content that will be loaded later on. This can be a very powerful class, if used correctly.

Methods

string GetContent(string url)

This method loads content from the location, url. url can be any any string, but if you haven't mapped content with PutContent, only protocols supported by cURL will be loaded, with the exception of the file:// protocol or OenBlox's own res:// protocol, which reads from the project's "res" directory.

void Load(string url)

This method loads content and doesn't return until the content has either been loaded or an error has occurred. url can be any string accepted by GetContent.

void Preload(string url)

This method preloads content, so that it can be quickly used at a later time. url can be any string accepted by GetContent.