Referência de funções
GameMaker Studio · GML · Downloadable content
gmda_getBootstrap
Fetches all always_download content in a single envelope at startup.
Asynchronous (result via event)
Signature
gmda_getBootstrap() -> realWhat it does
GETs /gamecontent/bootstrap with the session headers. The queued bootstrap_loaded event carries response, a flat envelope struct with a schema version and generated-at timestamp plus every always_download key at the top level, so one request pulls them all. Returns 1 once dispatched, or 0 when there is no active session.
Parameters
This function takes no parameters.
How to call it
Call gmda_getBootstrap() once (for example on a loading screen), then read the bootstrap_loaded event with gmda_pollEvent(). Read each key straight off response.
Result event: bootstrap_loaded { success, response }
Example
gmda_getBootstrap();
// in the Step event, drain the queue:
var e = gmda_pollEvent();
while (!is_undefined(e)) {
if (e.event == "bootstrap_loaded" && e.success) {
if (variable_struct_exists(e.response, "levels")) load_levels(e.response.levels);
}
e = gmda_pollEvent();
}Use cases
- Load every always_download asset at once on a loading screen.
- Grab the full always_download set in one request instead of per-key calls.