Справочник функций
Godot 4 · GDScript · Leaderboards & scores
get_extra_info
Returns the player's own custom_data dict on a table.
Synchronous (returns directly)
Signature
get_extra_info(table_index: int) -> DictionaryWhat it does
Returns a copy of the cached custom_data the player submitted with their best score on that table (the extra fields configured in the panel). No network call.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
| table_index | int | required | Table number to read (1-based: 1, 2, 3…). |
How to call it
Call any time after tables_loaded to read back the extra fields you attached to the player's score.
Returns: Dictionary: the player's custom_data for that table (server field names preserved), or {} if the index is invalid or there are no scores yet.
Example
var info := Gamdato.get_extra_info(1)
print("reached level %s" % info.get("level", "?"))Use cases
- Show the level or character the player used for their best score.
- Restore per-score metadata (country, mode, difficulty) in the UI.