I’m trying to determine the number of entries in a Game Circle leaderboard.
After calling ILeaderboard.LoadScores, I receive the expected data in ILeaderboard.scores, but the value of maxRange, which should be the total amount of scores the leaderboard contains, seems to be set to a large random number, different after each score request. What should I do to get the correct value?
ILeaderboard unityLeaderboard;
void RequestLeaderboard(string leaderboardToRequest)
{
unityLeaderboard = Social.CreateLeaderboard();
unityLeaderboard.id = leaderboardToRequest;
unityLeaderboard.range = new Range(1, 25);
unityLeaderboard.timeScope = TimeScope.AllTime;
unityLeaderboard.userScope = UserScope.Global;
unityLeaderboard.LoadScores(HandleLoadScoresCompleted);
}
void HandleLoadScoresCompleted(bool success)
{
if (success)
Debug.Log(unityLeaderboard.maxRange);
}