๊ธฐ์ˆ  ์ž๋ฃŒ

Get the player's score

Retrieve the current player's score from a leaderboard.
์ฝ๋Š” ์‹œ๊ฐ„ 1๋ถ„์ตœ๊ทผ ์—…๋ฐ์ดํŠธ: ์ผ ๋…„ ์ „

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));}
์ฐธ๊ณ 
Metadata is not retrieved by default.
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));}
์ฐธ๊ณ 
For methods that retrieve scores: if your player has not submitted a score and the leaderboard is bucketed, the player is not assigned a bucket. A failed score retrieval returns an error that has its
Reason
field set to
ScoreSubmissionRequired
.