Documentation

Support

Get the player's score

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

Get the entry for the player in the specified leaderboard with the
GetPlayerScoreAsync
method:
public async void GetPlayerScore(string leaderboardId){ var scoreResponse = await LeaderboardsService.Instance .GetPlayerScoreAsync(leaderboardId); Debug.Log(JsonConvert.SerializeObject(scoreResponse));}
To get the score with any associated metadata, use the
IncludeMetadata
option on the
GetPlayerScoreOptions
configuration object:
public async void GetPlayerScore(string leaderboardId){ var scoreResponse = await LeaderboardsService.Instance .GetPlayerScoreAsync( leaderboardId, new GetPlayerScoreOptions { IncludeMetadata = true } ); Debug.Log(JsonConvert.SerializeObject(scoreResponse));}