Social.LoadScores Manual     Reference     Scripting  
Scripting > Runtime Classes > Social
Social.LoadScores

static function LoadScores (leaderboardID : String, callback : System.Action<Score[]>) : void

Description

Load a default set of scores from the given leaderboard.

This uses default leaderboard parameters.

Social.LoadScores("Leaderboard01", scores => {
if (scores.Length > 0) {
Debug.Log ("Got " + scores.Length + " scores");
string myScores = "Leaderboard:\n";
foreach (IScore score in scores)
myScores += "\t" + score.userID + " " + score.formattedValue + " " + score.date + "\n";
Debug.Log (myScores);
}
else
Debug.Log ("No scores loaded");
});