ドキュメント

​
​

Development

User Acquisition

Monetization

産業

Leaderboards

Unity SDK

Admin API

Client API

Open Unity Dashboard

Leaderboards

このページは選択した言語では使用できません。
LiveOps
​
​
Leaderboards
  • Overview
  • Get started
  • Concepts
  • Tutorials
    • Configuration
    • Unity SDK tutorial
      • Add a new score
      • Get the player's score
      • Get scores
      • Get a range of scores centered around the player
      • Get scores for other players
      • Get scores for a certain tier
      • Get a list of available leaderboard versions
      • Get the player's score from a leaderboard version
      • Get scores from a leaderboard version
      • Get a range of scores centered around the player from a leaderboard version
      • Get scores for other players from a leaderboard version
      • Get scores for a certain tier from a leaderboard version
    • Unity SDK sample
    • Cloud Code samples
  • Reference
  • Privacy and consent
  1. Leaderboards
  2. Unity SDK tutorial

Get a range of scores centered around the player

Retrieve scores for a player and their neighboring competitors.
読み終わるまでの所要時間 1 分
最終更新 9ヶ月前

To get the entries of the player as well as 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));}
注
Metadata is not retrieved by default.
To get the score with any associated metadata, use the
IncludeMetadata
option on the
GetPlayerRangeOptions
configuration object:
public async void GetPlayerRangeWithMetadata(string leaderboardId){ var scoresResponse = await LeaderboardsService.Instance .GetPlayerRangeAsync( leaderboardId, new GetPlayerRangeOptions() { IncludeMetadata = true } ); Debug.Log(JsonConvert.SerializeObject(scoresResponse));}
注
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
.

Copyright © 2026 Unity Technologies
法規事項プライバシーポリシークッキーDocumentation Terms of Use私の個人情報を販売または共有しないプライバシーに関する選択 (クッキー設定)

"Unity" の名称、Unity のロゴ、およびその他の Unity の商標は、米国およびその他の国における Unity Technologies またはその関係会社の商標または登録商標です (詳しくはこちら)。その他の名称またはブランドは該当する所有者の商標です。

一部のページは利便性向上のため機械翻訳を使用しており、内容に不正確な表現が含まれる場合があります。内容に齟齬または不一致が生じた場合は、英語版を正本とします。


    このページの問題を報告する