ドキュメント

サポート

Get scores for other players

Retrieve scores for specific players in a leaderboard.
読み終わるまでの所要時間 1 分最終更新 3ヶ月前

注意
Using
GetScoresByPlayerIdsAsync
is not supported on leaderboards with buckets configured.
Get the scores for other players in the specified leaderboard with the
GetScoresByPlayerIdsAsync
method:
public async void GetScoresByPlayerIds(string leaderboardId){ var playerIds = new List<string>{ "abc123", "abc456" }; var scoresResponse = await LeaderboardsService.Instance .GetScoresByPlayerIdsAsync(leaderboardId, playerIds); Debug.Log(JsonConvert.SerializeObject(scoresResponse));}
Metadata is not retrieved by default.
To get the score with any associated metadata, use the
IncludeMetadata
option on the
GetScoresByPlayerIdsOptions
configuration object:
public async void GetScoresByPlayerIdsWithMetadata(string leaderboardId){ var playerIds = new List<string>{ "abc123", "abc456" }; var scoreResponse = await LeaderboardsService.Instance .GetScoresByPlayerIdsAsync( leaderboardId, playerIds, new GetScoresByPlayerIdsOptions { IncludeMetadata = true } ); Debug.Log(JsonConvert.SerializeObject(scoresResponse));}