- Home /
What are the "default leaderboard parameters" for Social.LoadScores?
http://unity3d.com/support/documentation/ScriptReference/Social.LoadScores.html?from=IScore
And how would I change them?
I'm assuming LoadScores returns an array of every score ranked from highest score to lowest score, so the top score would be scores[0]— but I can't find where in the docs it actually says what the defaults are and how they got there.
Answer by dentedpixel · Oct 13, 2012 at 06:31 PM
I couldn't figure this out either, but I found another way to load the score results, where I can manipulate the parameters. By using the function Social.CreateLeaderboard() you can adjust the parameters as you see fit, from the returned leaderboard object. Here is an example from my game Monkeyshines:
var leaderboard:UnityEngine.SocialPlatforms.ILeaderboard = Social.CreateLeaderboard();
leaderboard.id = "HighScores_JungleScenes"; leaderboard.LoadScores( function(loaded:boolean){
print("local score:"+leaderboard.localUserScore);
Debug.Log("Received " + leaderboard.scores.Length + " scores"); });
Awesome, this works well! Also for any nubs like me, you can just use:`leaderboard.LoadScores((bool success) =>` In replace of leaderboard.LoadScores( function(loaded:boolean)
for C#
Your answer
![](https://koobas.hobune.stream/wayback/20220613073207im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
ILeaderboard on iOS is not working? 0 Answers
Social.ShowLeaderboardUI not showing up on MacOS Standalone 0 Answers
(Crash) on calling Google Authentication 2 Answers
How to create a leaderboard....in unity for ios game 0 Answers
Can sign in using Google Play Games Plugin, but unable to load scores from the leaderboard 2 Answers