Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Google play not opening Leaderboards and Achievements UI

Discussion in 'Android' started by DarkBladeNemo, Oct 4, 2017.

  1. DarkBladeNemo

    DarkBladeNemo

    Joined:
    Aug 23, 2013
    Posts:
    116
    Hi,

    So I am not sure if this is suppose to go here or in the scripting section.

    Anywho my problem at the moment is my leaderboards and achievement ui are not opening when I press the button on my app. The app is published and the achievements do unlock so I know the sign in and so on is working.

    Code (CSharp):
    1.  public void OpenLeaderboardsScore()
    2.     {
    3.         if (Social.localUser.authenticated)
    4.         {
    5.             ((PlayGamesPlatform)Social.Active).ShowLeaderboardUI (LEADERBOARDS_SCORE);
    6.         }
    7.     }
    Code (CSharp):
    1.  public void OpenAchievements()
    2.     {
    3.         if (Social.localUser.authenticated)
    4.         {
    5.             ((PlayGamesPlatform)Social.Active).ShowAchievementsUI ();
    6.         }
    7.     }
    8.  
    I have looked at different variations of the codes used and tried them all but still not luck.
    Any help would be appreciated.

    Note the methods tried before:

    Code (CSharp):
    1. PlayGamesPlatform.Instance.ShowLeaderboardUI ();
    2.             PlayGamesPlatform.Instance.ShowAchievementsUI ();
    3.             Social.ShowAchievementsUI ();
    4.             Social.ShowLeaderboardUI ();
     
  2. SoftwareGeezers

    SoftwareGeezers

    Joined:
    Jun 22, 2013
    Posts:
    902
    Isn't that using a plugin? AFAIK Unity doesn't support Google Play Services. As such you'll want support for that plugin, not Unity/Android.
     
  3. IlIDeathIlI

    IlIDeathIlI

    Joined:
    Jan 10, 2016
    Posts:
    1
    You and I are experience the same exact problem. My game will unlock achievements and log in the user and even pop up that an achievement has been unlocked but the UI for both leaderboards and achievements does not show when the buttons linked to the call is pressed. I've been browsing google for resolution to this for about two weeks now to no avail.
     
  4. SoftwareGeezers

    SoftwareGeezers

    Joined:
    Jun 22, 2013
    Posts:
    902
    I had leaderboards not updating. They were actually showing the old data from a previous build with a different package name. It was a very convoluted mess that took a month of two of back-and-forth with Google to solve. Eventually the old Google Cloud service was closed, the Google Play service was redirected, the original app was deleted to let me use a new package id, and it finally worked.

    Do contact Google directly. They were very helpful and kept with me until it was solved.