Legacy Documentation: Version 4.6.2
Language: English
  • C#
  • JS
  • Boo

Script language

Select your preferred scripting language. All code snippets will be displayed in this language.

ILeaderboard

Namespace: UnityEngine.SocialPlatforms

/

Suggest a change

Success!

Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.

Close

Sumbission failed

For some reason your suggested change could not be submitted. Please try again in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.

Close

Cancel

Description

The leaderboard contains the scores of all players for a particular game.

Each game can have multiple leaderboards with different scores. A leaderboard object can be customized to perform a particular query. The leaderboard ID defines which leaderboard is being queried and there are filters to narrow down the results, UserScope, TimeScope, Range and SetUserFilter. Use Social.CreateLeaderboard to create an instance of this object.

Variables

id Unique identifier for this leaderboard.
loading The leaderboad is in the process of loading scores.
localUserScore The leaderboard score of the logged in user.
maxRange The total amount of scores the leaderboard contains.
range The rank range this leaderboard returns.
scores The leaderboard scores returned by a query.
timeScope The time period/scope searched by this leaderboard.
title The human readable title of this leaderboard.
userScope The users scope searched by this leaderboard.

Functions

LoadScores Load scores according to the filters set on this leaderboard.
SetUserFilter Only search for these user IDs.