Reference des fonctions
Godot 4 · GDScript · Leaderboards & scores
reload_info
Forces a reload of all leaderboard tables; finishes with the tables_loaded signal.
Asynchronous (result via signal)
Signature
reload_info() -> boolWhat it does
Resets the table-loading state so the plugin re-fetches every declared table from the server, emitting tables_loaded when they're all back in. Returns false immediately if there's no active session; otherwise returns true and the reload runs in the background.
Parameters
This function takes no parameters.
How to call it
Connect tables_loaded first, then call this to pull fresh rankings on demand (e.g. when the player opens the leaderboard screen or pulls to refresh).
Result signal: tables_loaded()
Example
Gamdato.tables_loaded.connect(_on_tables)
if Gamdato.reload_info():
print("refreshing rankings…")
func _on_tables() -> void:
show_leaderboard(Gamdato.get_table_data(1))Use cases
- Refresh all leaderboards when the player opens the ranking screen.
- Implement a manual pull-to-refresh for scores.