2

I've finally made a game that I am happy to push on the android store and I have everything down packed except for a few minor details like implementing the leader board and achievements.

Now, I've followed the tutorial on the video produced by Bruno and Dan and have been able to sign in with multiple devices and multiple accounts, but nothing else seems to work.

I'm using unity and the plugin / sdk that was provided and told to download.

The things I am having trouble with is even getting the achievements and leader boards. I am using this code which was in the video:

// post score 12345 to leaderboard ID "Cfji293fjsie_QA")
        Social.ReportScore(12345, "(I have my leader board code here but am masking it for safety)", (bool success) => {
            // handle success or failure
        });

In that code I have it basically setup for the moment with testing that if a GUI.Button is pushed, the player will send the score 12345 to the leader board. Then once that is done, there is another button that can open the ShowLeaderBoardUI function that was also given in the video.

Once in the game on my phone, the scores wont show up, or the leader board itself once pressing the button either.

Am I doing something wrong? I'm not sure if I need to include anything else and I'm not even inputting my variables of score into the leader board yet for testing purposes.

If you need anymore information let me know.

I have the game in Beta on the Google Play Store with the application saying "Published", the Game Services say "Published". I have linked the app to the Game Services with the correct OUATH 2.0, with the correct App ID. All achievements and leader boards say "Published". Both of my email accounts are linked to the Game Services.

I'm just not sure where I have gone wrong and why I can't even ShowLeaderboardUI or even post a score.

Also is there a way to view the leader boards and achievements on a computer as apposed to a phone? or do I need to be on the phone to check them?

Thanks,

Chris

EDIT: Forgot to include that I can sign in and have all of the regular Google Play sign in graphics and it's signs in fine.

EDIT2: Forgot to mention that the game is in Beta in the Google Play Store.

user3358578
  • 21
  • 1
  • 3
  • I am also seeing this problem. Signing in works fine, but if I try unlocking achievements, posting a high score, or showing either the achievements page or the leaderboard, then nothing appears. My project is also in beta. Maybe that's the issue? Do you have AdMob installed as well? – Peter Andrews Mar 04 '14 at 07:36
  • Hi Peter, I don't have AdMob installed as of yet to minimise issues. I will work it into my final release, but I'm still not sure if the project being in beta would effect it. I've seen nothing online about if the game needs to be published (not in beta) for achievements and leader boards to work, I am hoping some can chime in and help us! – user3358578 Mar 05 '14 at 11:14

3 Answers3

2

For what it's worth. I wasn't able to get Google's plugin to work, so I deleted everything google related in my project and installed this.

https://github.com/faizann/UnityGPGPlugin

Authentication works now, as well as reporting scores to the leaderboard. So it would appear that the issue actually lies with something in Google's plugin and not my setup on the developer console.

  • Thank you very much I will try this and report back! – user3358578 Mar 11 '14 at 00:43
  • Peter, how have you implemented the plugin? I've got it installed and everything but I'm not sure how I call the leaderboard or achievement functions. – user3358578 Mar 11 '14 at 07:15
  • Peter, I am still stuck on how I'm meant to do any of this. I can't sign in, black screen crash, I can't report a score because there is no readme that explains what to do at all. Please help. Thanks – user3358578 Mar 14 '14 at 06:35
  • Sorry for late reply, but I eventually went back to using Google's unity plugin. After a factory reset of my phone, everything worked correctly. – Peter Andrews Aug 26 '14 at 16:09
2

Add the following statement before Authenticating the local user.

PlayGamesPlatform.Activate();

this will solve your issue

Jon
  • 9,156
  • 9
  • 56
  • 73
Surender
  • 21
  • 1
-1

I have had the same problem as the OP and tried to solve it for days. I could signin normally, but when calling ShowLeaderboardUI, ShowAchievementsUI or pretty much anything else, it did nothing.

What solved my issue was removing Facebook and Playfab plugins I had installed on my project. I reinstalled Google Play Games plugin and everything went fine.