3

I have enabled google play games plugin in my Unity Project. The Unity version is 5.3.4f1. The google play games plugin version is 0.9.32. I have successfully logged in to the google play games service in my project. After submitting the score,and when I try to view the leaderboard, its showing an error like this in the log:

04-29 09:58:53.537: I/Unity(6910):  [Play Games Plugin DLL] 04/29/16 9:58:53 +05:30 DEBUG: Entering internal callback for AndroidPlatformConfiguration#InternalIntentHandler

04-29 09:58:53.537: I/Unity(6910): (Filename: ./artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 37)

04-29 09:58:53.575: I/Unity(6910):  [Play Games Plugin DLL] 04/29/16 9:58:53 +05:30 DEBUG: Application is pausing, which disconnects the RTMP  client.  Leaving room.

04-29 09:58:53.575: I/Unity(6910): (Filename: ./artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 37)

04-29 09:58:55.940: D/GamesUnitySDK(6910): Forwarding OnActivityResult

04-29 09:58:55.963: D/GamesUnitySDK(6910): Forwarding OnActivityResult Finished

04-29 09:58:55.999: I/Unity(6910):  [Play Games Plugin DLL] 04/29/16 9:58:55 +05:30 DEBUG: Showing UI Internal callback: ERROR_NOT_AUTHORIZED

04-29 09:58:55.999: I/Unity(6910): (Filename: ./artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 37)

04-29 09:58:56.077: I/Unity(6910):  [Play Games Plugin DLL] 04/29/16 9:58:56 +05:30 DEBUG: Invoking user callback on game thread

04-29 09:58:56.077: I/Unity(6910): (Filename: ./artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 37)

04-29 09:58:56.085: I/Unity(6910):  [Play Games Plugin DLL] 04/29/16 9:58:56 +05:30 DEBUG: Received UI callback: ERROR_NOT_AUTHORIZED

04-29 09:58:56.085: I/Unity(6910): (Filename: ./artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 37)

04-29 09:59:54.185: I/Unity(6910):  [Play Games Plugin DLL] 04/29/16 9:59:54 +05:30 DEBUG: Application is pausing, which disconnects the RTMP  client.  Leaving room.

04-29 09:59:54.185: I/Unity(6910): (Filename: ./artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 37)

I'm getting an error like this

DEBUG: Received UI callback: ERROR_NOT_AUTHORIZED

I have successfully login also, but still its showing as Error not authorized. Here is my code.

using GooglePlayGames;
using GooglePlayGames.BasicApi;

public class GooglePlayGameService : MonoBehaviour {
void Start()
{
    PlayGamesClientConfiguration config = new PlayGamesClientConfiguration.Builder()
   .RequireGooglePlus()
   .Build();

    PlayGamesPlatform.InitializeInstance(config);
    PlayGamesPlatform.DebugLogEnabled = true;
    PlayGamesPlatform.Activate();

    Social.localUser.Authenticate((bool Success)=>{
        if(Success)
        {
            mStatusText = "Welcome " + Social.localUser.userName;
            Debug.Log("Success Google Play Games");
        }
        else
        {
            mStatusText = "Authentication failed.";
            //ShowNextScene ();
            Debug.Log("failed Google Play Games");
        }

    });
}
}

public void ShowScoreBoard()
{

   Debug.Log("User Authenticated: " + Social.localUser.authenticated); 
   if (Social.localUser.authenticated)
        ((PlayGamesPlatform)Social.Active).ShowLeaderboardUI("leaderboard id here");
}

When I check whether the user is authenticated or not, it is returning true, when I debug it. But the leaderboard is not showing up. can some one please help me in solving this error. Thanks in advance.

njnjnj
  • 978
  • 4
  • 23
  • 58

1 Answers1

-1

if EnableSavedGames() is used in the Builder(), then you'll need to toggle on SavedGames support in the Developer Console and also enable Drive API in the "API Console Project". The place to reach all of this would be the "Game Details" page in the Developer Console.

make sure you dont have multiple debug.keystore on your computer and your SHA1 on the Developer Console and build should be the same

Milad Qasemi
  • 3,011
  • 3
  • 13
  • 17
  • Enable Saved Games is turned off in developer console. There is nothing to enable in the API Console Project in developer console. I cant find the drive API. Can you please help me. – njnjnj Apr 29 '16 at 10:12
  • turn it on not off – Milad Qasemi Apr 29 '16 at 10:15
  • I have turned on, but still its not loading leaderboard. – njnjnj Apr 29 '16 at 10:35
  • check if your SHA1 on the Developer Console is different from the build – Milad Qasemi Apr 29 '16 at 10:47
  • I have added the release keystore in the unity project, as the project is going to release soon. Create a SHA1 key using the release keystore and given the sha1 in the google play developer console too. – njnjnj Apr 29 '16 at 11:00
  • I dont have multiple debug.keystore in my computer – njnjnj Apr 29 '16 at 11:00
  • @MiladQasemi I have one keystore I created and only one. However, I have 2 key aliases at the player settings: the *Unsigned (debug)* and the custom key created. Was this issue count or can still show leaderboard? – David Dimalanta Jul 07 '16 at 02:57