Get scores for a certain tier from a leaderboard version
Retrieve scores filtered by tier from a specified leaderboard version.
阅读时间1 分钟最后更新于 1 个月前
To get scores for a particular tier from a leaderboard version, use the
GetVersionScoresByTierAsyncPaginated access to all scores within the tier is available by specifying the optionalpublic async void GetVersionScoresByTier(string leaderboardId, string versionId){ var scoresResponse = await LeaderboardsService.Instance .GetVersionScoresByTierAsync(leaderboardId, versionId, "silver"); Debug.Log(JsonConvert.SerializeObject(scoresResponse));}
GetVersionScoresByTierOptionsOffsetLimitOffsetLimitpublic async void GetPaginatedVersionScoresByTier(string leaderboardId, string versionId){ var scoresResponse = await LeaderboardsService.Instance.GetVersionScoresByTierAsync( leaderboardId, versionId, "silver", new GetVersionScoresByTierOptions{ Offset = 25, Limit = 50 } ); Debug.Log(JsonConvert.SerializeObject(scoresResponse));}
To get the score with any associated metadata, use the
IncludeMetadataGetVersionScoresByTierOptionsFor details on how to get available leaderboard version IDs, visit Get available leaderboard version.public async void GetVersionScoresByTierWithMetadata(string leaderboardId, string versionId){ var scoresResponse = await LeaderboardsService.Instance.GetVersionScoresByTierAsync( leaderboardId, versionId, "silver", new GetVersionScoresByTierOptions { IncludeMetadata = true } ); Debug.Log(JsonConvert.SerializeObject(scoresResponse));}