Documentation

Support

Get the player's score from a leaderboard version

Retrieve the current player's score from an archived leaderboard.
Read time 1 minuteLast updated 21 days ago

Players can get their entry in the specified leaderboard archive version with the
GetVersionPlayerScoreAsync
method:
public async void GetPlayerVersionScore(string leaderboardId, string versionId){ var scoreResponse = await LeaderboardsService.Instance .GetVersionPlayerScoreAsync(leaderboardId, versionId); Debug.Log(JsonConvert.SerializeObject(scoreResponse));}
To get the score with any associated metadata, use the
IncludeMetadata
option on the
GetVersionPlayerScoreOptions
configuration object:
public async void GetPlayerVersionScoreWithMetadata(string leaderboardId, string versionId){ var scoreResponse = await LeaderboardsService.Instance .GetVersionPlayerScoreAsync( leaderboardId, versionId, new GetVersionPlayerScoreOptions { IncludeMetadata = true } ); Debug.Log(JsonConvert.SerializeObject(scoreResponse));}
For details on how to get available leaderboard version IDs, visit Get available leaderboard version.