PcoWSkbVqDnWTu_dm2ix
We use cookies on this site to enhance your user experience
Collapse Sidebar

ContentProvider

Show deprecated

ContentProvider

Show deprecated

The ContentProvider is a service that is used to load content, or assets, into a game.

The service’s main use is to preload assets into a game. When a new asset, such as a Decal or Sound is used in a game, Roblox will load the content associated with it from Roblox servers. In some cases this can be undesirable for developers as it can lead to a delay before the content loads into the game.

With ContentProvider, developers can preload assets using the ContentProvider/PreloadAsync function. Another useful property is ContentProvider/RequestQueueSize, which can be used to measure what proportion of assets in the request queue have been downloaded.

Properties

string

BaseUrl

[ReadOnly] [NotReplicated]

The base URL that is used by the ContentProvider for downloading assets from the Roblox website.

int

RequestQueueSize

[ReadOnly] [NotReplicated]

RequestQueueSize gives the number of items in ContentProvider's request queue that need to be loaded.

Functions

void

PreloadAsync ( Array contentIdList , Function callbackFunction )

[Yields]

Yields until all of the assets associated with the given Instance|Instances have loaded

void

SetBaseUrl ( string url )

Sets /ContentProvider/BaseUrl, used by CoreScripts to interact with the web APIs.

Events