๊ธฐ์ˆ  ์ž๋ฃŒ

Get a range of scores centered around the player

Retrieve scores for a player and their neighboring competitors.
์ฝ๋Š” ์‹œ๊ฐ„ 1๋ถ„์ตœ๊ทผ ์—…๋ฐ์ดํŠธ: 2์ผ ์ „

To get the entries of the player and the specified number of neighboring players ranked on either side of the player, use the
GetPlayerRangeAsync
method:
public async void GetPlayerRange(string leaderboardId){ // Returns a total of 11 entries (the given player plus 5 on either side) var rangeLimit = 5; var scoresResponse = await LeaderboardsService.Instance.GetPlayerRangeAsync( leaderboardId, new GetPlayerRangeOptions{ RangeLimit = rangeLimit } ); Debug.Log(JsonConvert.SerializeObject(scoresResponse));}
์ฐธ๊ณ 
By default, score responses don't include metadata.
To get the score with any associated metadata, use the
IncludeMetadata
option on the
GetPlayerRangeOptions
configuration object:
public async void GetPlayerRangeWithMetadata(string leaderboardId){ // Returns a total of 11 entries (the given player plus 5 on either side) var rangeLimit = 5; var scoresResponse = await LeaderboardsService.Instance .GetPlayerRangeAsync( leaderboardId, new GetPlayerRangeOptions { RangeLimit = rangeLimit, IncludeMetadata = true } ); Debug.Log(JsonConvert.SerializeObject(scoresResponse));}
์ฐธ๊ณ 
If the player hasn't submitted a score on a bucketed leaderboard, they're not assigned a bucket, and score retrieval fails with
Reason
set to
ScoreSubmissionRequired
.

Additional resources