Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 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
4
Question by Potices · Oct 21, 2014 at 08:16 PM · google playgoogleleaderboard

Google Play Services show leaderboard

I'm trying to implement the Google Play Services into game. I've followed this guide: https://github.com/playgameservices/play-games-plugin-for-unity

I've followed the setup instructions for the Play console, and I have setup my game inside Play Console (play.google.com/apps/publish). I have set a test account up, which I'm currently using. I don't know what I did wrong, but I havn't used the Signing Certificate fingerprint (SHA1) at all.

I am currently using a version of my APK, that isn't on the play store, because of testing.

I am able to sign in just fine, but the report score doesn't work as it should. Nor does the ShowLeaderBoardUI. I have tried different things, but this is my current version of the code:

 if(GUI.Button(new Rect (Screen.width/2 - 105*u, Screen.height/3 + 450*u, 210*u, 210*u), "Score")){
                 // Activate the Google Play Games platform
                 PlayGamesPlatform.DebugLogEnabled = true; 
                 PlayGamesPlatform.Activate();
                 Social.localUser.Authenticate((bool success) => {
                     if(success){
                         Social.ReportScore(PlayerPrefs.GetInt ("best"), "CxxxxQ", (bool s) => {
                                 ((PlayGamesPlatform) Social.Active).ShowLeaderboardUI("CxxxxQ");
                         });
                     } else {
                         print ("Did not authenciate.");
                     }
                 });
             }

I have tried the following two versions too:

 Social.ReportScore(PlayerPrefs.GetInt ("best"), "CxxxxQ", (bool s) => {
                             if(s) {
                                 ((PlayGamesPlatform) Social.Active).ShowLeaderboardUI("CxxxxQ");
                             } else {
                                 print ("Something went wrong");
                             }
                                 
                         });

and

 Social.localUser.Authenticate((bool success) => {
                     if(success){
                         Social.ReportScore(PlayerPrefs.GetInt ("best"), "CxxxxQ", (bool s) => {
                             if(s) {
                                 ((PlayGamesPlatform) Social.Active).ShowLeaderboardUI("CxxxxQ");
                             } else {
                                 print ("Something went wrong");
                                 //Just to test if it's called, since I can't see the print
                                 Application.LoadLevel(Application.loadedLevel);
                             }
                                 
                         });

None of them are called however, and I can't see why not?

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 AkooleGame · Dec 07, 2014 at 11:02 AM 1
Share

There is an update to GooglePlayServices Unity plugin on GitHub. Try it.

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by BBQBoys · Aug 14, 2018 at 07:03 PM

Hey @Potices,

I've had similar problem, I could not figure it out, followed all the guidelines but without success.

But finally I have decided to publish game (signed, so I recommend you do that as well) to alpha and suddenly it started to work so try to sign it and publish to alpha it might just work. :)

If you find this advice useful please try my game. https://play.google.com/store/apps/details?id=com.HOTBBQ.MarshatheMarshmallow&hl=en

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

5 People are following this question.

avatar image avatar image avatar image avatar image avatar image

Related Questions

Google Play Games Plugin(A simple issue) 0 Answers

Google play services leaderboards 1 Answer

Google Play Leaderboard help 0 Answers

Can't see public leaderboard from google play 1 Answer

How to Implement Google Play Games? 0 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