Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 14 Next capture
2021 2022 2023
2 captures
13 Jun 22 - 14 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by Martin-S · Oct 25, 2014 at 05:15 PM · iosleaderboardsocialleaderboardsgame center

Wrong values for ILeaderboard.maxRange

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);
 }
Comment
Add comment · Show 3
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image JTJam · Nov 23, 2015 at 09:59 AM 0
Share

I'm having the exact same issue, anyone knows how to fix that?

avatar image Martin-S · Nov 23, 2015 at 10:10 AM 0
Share

I mentioned Game Circle by mistake in the question, but when I was having this issue it was in fact for iOS Game Center. Because I could not fix this using Unity's Social API I switched to using prime[31]'s Game Center plugin.

avatar image JTJam · Nov 24, 2015 at 04:32 AM 0
Share

You're right, Unity doesn't seem to fill up the maxRange property from the iOS GameCenter leaderboards... So I ended up writing an iOS plugin that does retrieve my leaderboard maxRange. I hope they fix that someday, should be fairly easy to fix!

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by eddyb · Apr 20 at 02:54 AM

7 years later, and I'm having the same problem. That is, after a call to LoadScores, maxRange is some random, large integer. So I tried writing my own plugin, and get the correct value in my objective-c call, so this really seems to be a Unity bug that has never been fixed. If you need this value, write your own plugin I guess, or use Prime31's plugin, which apparently works a lot better than Unity's API.

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

6 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

iOS Game Center displays "No Challenges" Instead of Achievements/Leaderboards 3 Answers

ILeaderboard on iOS is not working? 0 Answers

'Social.Showleaderboardsui()' keeps showing the achievements page in iOS? 1 Answer

In App Game Center Leaderboard and Login use Device Orientation and Change Unity Orientation in the Game 0 Answers

Did Social.LoadUsers() stop working? 3 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges