GBX.lua.ContentProvider (Service)

From Goodblox Wiki
Revision as of 03:24, 25 September 2021 by Xyrafrost (talk | contribs) (created the page)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search
Note: This is a Game Service, and therefore isn't like other Objects in the Class Explorer. You have to call it with :
game:GetService("<Service name>")

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, GoodBlox will load the content associated with it from GoodBlox/Roblox servers. In some cases this can be undesirable as it can lead to a delay before the content loads into the game.

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

Functions

In addition to the Global functions, the ContentProvider also has these:

# indicates a locked function. These should NOT be tampered with.

Properties

In addition to the Global properties, the ContentProvider also has these:

Events

The ContentProvider object only incorporates the global events.