Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 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 Gehrman3 · May 10, 2017 at 04:06 PM · loadinggoogle playleaderboardachievements

Google Play load problem

Hi, I have a problem. I get autenticate a local user, create a leaderboard.....all is ok. Furthermore when I start my app a Google Play welcomes me. But the issue is when I try to show that leaderboard through a button. It doesn´t work. A popup appears . it says leaderboard and it loads something but never showing anything and my achievements doesn't show up.

EDIT: My friend can see leaderboards but he said he waited like 1 minute. I guess problem is loading time. how can i fix it?

at start

 PlayGamesPlatform.Activate();
         if (!Social.localUser.authenticated) {
             Social.localUser.Authenticate ((bool success) => {
 
                 if(success){
                     Debug.Log("Logged in");
                 } else {
                     Debug.Log("Not Logged in");
                 }
                 
             });
         }

leaderboard button

 public void LeaderBoard(){
     if (Social.localUser.authenticated) {
         ((PlayGamesPlatform) Social.Active).ShowLeaderboardUI ();
     } else {
             Debug.Log("Not Logged in");
     }
 }

and an example

 Social.ReportScore ((long) highScoreCount, rot.leaderboard_normal_mode, (bool success) => {
 
         });

achievement button

 public void Achievement(){
         if (Social.localUser.authenticated) {
             Social.ShowAchievementsUI();
         } else {
             Debug.Log("Not Logged in");
         }
     }

and an example

 if (PlayerPrefs.GetFloat ("hs1") == 50 || PlayerPrefs.GetFloat ("hs1") > 50) {
 
                 Social.ReportProgress (rot.achievement_amazing, 100.0f, (bool success) => {
 
                 });
             }
Comment
Add comment · Show 10
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 RobAnthem · May 10, 2017 at 08:24 PM 0
Share

I'm not sure if it makes a difference, but when I call to google leaderboards, I call to the PlayGamesPlatform, and not the standard Social platform. Have you tried using a PlayGamesPlatform call and not box converting it through the standard social?

avatar image Gehrman3 RobAnthem · May 11, 2017 at 11:28 AM 0
Share

I tried but nothing changes.

avatar image SohailBukhari · May 11, 2017 at 07:03 AM 0
Share

I think you are missing ids of achievements and leaderboard in the method calls.

 ((PlayGamesPlatform) Social.Active).Show$$anonymous$$erboardUI (//here will be leaderboard id);

make sure you have set PlayGames setting in the unity

avatar image Gehrman3 SohailBukhari · May 11, 2017 at 11:42 AM 0
Share

I have already set playgames setting but i tried what you said it gives me this errorAssets/Scripts/$$anonymous$$ain$$anonymous$$enu.cs(154,40): error CS1502: The best overloaded method match for `GooglePlayGames.PlayGamesPlatform.Show$$anonymous$$erboardUI(string, GooglePlayGames.BasicApi.$$anonymous$$erboardTimeSpan, System.Action)' has some invalid arguments

avatar image SohailBukhari SohailBukhari · May 11, 2017 at 01:04 PM 0
Share

when you set playgames in the editor then unity creates static class GPGIDs, but you can change the name when making setup.

 PlayGamesPlatform.Instance.Show$$anonymous$$erboardUI (GPGIDs.leaderboard_ID);

just pass the leaderboard id from your static class which made during setup.

Note: don't forget to paste resources which you copied from the console.

avatar image Gehrman3 SohailBukhari · May 11, 2017 at 01:14 PM 0
Share

just 5 $$anonymous$$utes ago $$anonymous$$erboard opened everything is fine. But the problem is load time. I wait for 10 $$anonymous$$utes. Is it still the same problem? And achievement problem still continues

Show more comments
Show more comments

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.

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 Services Working, but not Working? 2 Answers

Social.ShowAchievementsUI() not showing achievements 1 Answer

Unity Game not correctly configured to use google play game services 0 Answers

How can I include the resources folder to my project and build it to play on android devices? 1 Answer

Achievements Google Play. 1 Answer


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