• 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
1
Question by whiletruefork · Nov 05, 2012 at 06:37 AM · iossocialgamecenterleaderboards

When will Social.ReportScore() fail?

I've got a sandbox leaderboard set up and I thought I'd implement some basic score caching in case the iPhone didn't have connection (you know, on a plane, in a subway, in someone's faraday cage rec room, whatever). The plan was to run Social.ReportScore, check the callback result and if false, cache the score to PlayerPrefs or whatever for the next time the system successfully authenticated.

However... testing it in Airplane mode, the ReportScore result returns true even though GameCenter doesn't get the update (my guess is that it would return false if I had a malformed leaderboard identifier). And when I run the game again with the wifi back on, the scoreboards aren't updated.

So... it appears that Social.ReportScore call is returning true as long as the GameCenter API accepts the call from Unity... but seems unaware of the results beyond that. Is anyone else seeing something similar?

The code is pretty vanilla but for reference, here's what I am doing:

     public static void SubmitScore(int score)
     {
         Social.ReportScore(score,"leaderboard", SuccessCheck);
     }
 
     static void SuccessCheck(bool result)
     {
         if(result)
         {
             Debug.Log("score submission successful");
         }
         else
         {
             Debug.Log("score submission failed");
         }
     }


I'm getting a "score submission successful" debug log every time when I do this in Airplane mode.

The basic GameCenter API clearly works in offline mode (you can authenticate in as a user, for example-- at least in the Sandbox), so checking the Authenticated status of Social.localUser won't help either...

Comment
Add comment · Show 1
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 AlucardJay · Nov 06, 2012 at 01:42 AM 0
Share

I gave up myself, but with follow up reading, it seems that more than one device must be testing the app, and all the devices must be friends. Here are a couple of links relating to the above :

Here's what I found.

Social.ReportScore() works just fine. The issue is that Game Center doesn't appear to show leaderboard content for the localUser if the localUser is the only player with an entry in the leaderboard.

If you test with Player1, set a score, and view the leaderboard, you won't see Player1. But if you then test with Player2, and view the leaderboard, you'll see Player1 but not Player2. If you then set a score with Player2, and view the leaderboard again, you'll see both Player1 and Player2.

(from : http://forum.unity3d.com/threads/116901-Game-Center-Support/page4 )

http://answers.unity3d.com/questions/234471/game-center-reportscore-leaderboard.html

http://answers.unity3d.com/questions/252862/no-score-on-game-center-leaderboard.html

Good Luck =]

0 Replies

· Add your reply
  • Sort: 

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.

Welcome to Unity Answers

The best place to ask and answer questions about development with Unity.

To help users navigate the site we have posted a site navigation guide.

If you are a new user to Unity Answers, check out our FAQ for more information.

Make sure to check out our Knowledge Base for commonly asked Unity questions.

If you are a moderator, see our Moderator Guidelines page.

We are making improvements to UA, see the list of changes.



Follow this Question

Answers Answers and Comments

11 People are following this question.

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

Related Questions

Did Social.LoadUsers() stop working? 3 Answers

GameCenterPlatform - Load leaderboards with custom parameters 1 Answer

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

Wrong values for ILeaderboard.maxRange 1 Answer

iOS Game Center displays "No Challenges" Instead of Achievements/Leaderboards 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