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
GetVersionPlayerScoreAsyncpublic 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
IncludeMetadataGetVersionPlayerScoreOptionsFor details on how to get available leaderboard version IDs, visit Get available leaderboard version.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));}