Referencia de funciones
GameMaker Studio · GML · Downloadable content
gmda_listGameContent
Lists every content item configured for this game, with per-item metadata.
Asynchronous (result via event)
Signature
gmda_listGameContent() -> realWhat it does
GETs /gamecontent/list with the session headers. The queued content_list_loaded event carries response, whose items array lists one entry per configured item: its key, category ("on_demand" or "always_download"), version, data type, byte size and metadata. This is the catalog only; it does not download the payloads themselves. Returns 1 once dispatched, or 0 when there is no active session.
Parameters
This function takes no parameters.
How to call it
Call gmda_listGameContent(), then read the content_list_loaded event with gmda_pollEvent() in your Step loop.
Result event: content_list_loaded { success, response }
Example
gmda_listGameContent();
// in the Step event, drain the queue:
var e = gmda_pollEvent();
while (!is_undefined(e)) {
if (e.event == "content_list_loaded" && e.success) {
var items = e.response.items;
for (var i = 0; i < array_length(items); i++) {
show_debug_message(string(items[i].key) + " v" + string(items[i].version) + " (" + string(items[i].category) + ")");
}
}
e = gmda_pollEvent();
}Use cases
- Discover which content keys and versions the panel currently exposes.
- Build an on-demand download menu from the live catalog instead of hardcoding keys.