Leaderboard Score Submit
Goal
Report a score and optionally open the native Leaderboard UI.
Prerequisite
Make sure the player is authenticated first. Use use-case-1-auth-bootstrap.md for a safe startup flow.
Actions used
GameServicesReportScoreGameServicesGetReportScoreSuccessResult(on success)GameServicesGetReportScoreError(on failure)GameServicesShowLeaderboardUI(optional)
Variables
leaderboardId(String) e.g."top_scores"scoreValue(Long)
Flow
When the match ends (or on a milestone), store the score in
scoreValue.State:
ReportScoreAction:
GameServicesReportScoreInputs:
leaderboardId,scoreValue(and optionaltag)Events:
successEventβGetReportScoreSuccessResultβ (optional)ShowLeaderboardUIfailureEventβGetReportScoreError(log/ignore)
State:
ShowLeaderboardUI(optional)Action:
GameServicesShowLeaderboardUIInput:
leaderboardId(to open a specific board)
Notes
GameServicesReportScorewaits for completion. Use the extractor actions immediately after itssuccessEvent/failureEvent.Some platforms keep only the best score; submitting a lower score may not change ranking.
Last updated
Was this helpful?