Referência de funções
Godot 4 · GDScript · Downloadable content
list_game_content
Lists every content item configured for this game, with per-item metadata.
Asynchronous (result via signal)
Signature
list_game_content() -> voidWhat it does
GETs /gamecontent/list. items is an Array of Dictionary, one per configured item: { key, category ("on_demand"|"always_download"), version, data_type, byte_size, mime_type, metadata }. Empty Array on failure or when no items are configured. This is the catalog only; it does not download the payloads themselves.
Parameters
This function takes no parameters.
How to call it
Connect content_list_loaded first, then call list_game_content().
Result signal: content_list_loaded(items: Array)
Example
Gamdato.content_list_loaded.connect(_on_list)
Gamdato.list_game_content()
func _on_list(items: Array) -> void:
for it in items:
print("%s v%d (%s)" % [it.key, it.version, it.category])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.