将分数发布到Unity3d中的排行榜后,Google Play排行榜不会显示 [英] Google Play Leaderboard not showing up after posting score to leaderboard in Unity3d

查看:566
本文介绍了将分数发布到Unity3d中的排行榜后,Google Play排行榜不会显示的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Unity项目中启用了Google Play游戏插件。 Unity版本是5.3.4f1。谷歌玩游戏插件版本是0.9.32。我已成功登录到我的项目中的Google Play游戏服务。提交得分后,当我尝试查看排行榜时,它在日志中显示如下错误:

  04- 29 09:58:53.537:I / Unity(6910):[玩游戏插件DLL] 04/29/16 9:58:53 +05:30 DEBUG:输入AndroidPlatformConfiguration的内部回调#InternalIntentHandler 

04-29 09:58:53.537:I / Unity(6910):(文件名:./artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp行:37)

04-29 09:58:53.575:I / Unity(6910):[玩游戏插件DLL] 04/29/16 9:58:53 +05:30 DEBUG:应用程序暂停,断开RTMP客户端。离开房间。

04-29 09:58:53.575:I / Unity(6910):(文件名:./artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp行:37)

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

04-29 09:58:55.963:D / GamesUnitySDK(6910):转发OnActivityResult完成

04-29 09:58:55.999:I / Unity(6910):[玩游戏插件DLL] 04/29/16 9:58:55 +05:30 DEBUG:显示UI内部回调: ERROR_NOT_AUTHORIZED

04-29 09:58:55.999:I / Unity(6910):(文件名:./artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp行:37)

04-29 09:58:56.077:I / Unity(6910):[玩游戏插件DLL] 04/29/16 9:58:56 +05:30 DEBUG:在游戏线程上调用用户回调

04-29 09:58:56.077:I / Unity(6910):(文件名:./artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp行:37)

04-29 09:58:56.085:I / Unity(6910):[玩游戏插件DLL] 04/29/16 9:58:56 +05:30 DEBUG:收到UI回调: ERROR_NOT_AUTHORIZED

04-29 09:58:56.085:I / Unity(6910):(文件名:./artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp行:37)

04-29 09:59:54.185:I / Unity(6910):[玩游戏插件DLL] 04/29/16 9:59:54 +05:30 DEBUG:应用程序暂停,断开RTMP客户端。离开房间。

04-29 09:59:54.185:I / Unity(6910):(文件名:./artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp行:37)

我得到这样的错误


DEBUG:已收到用户界面回调:ERROR_NOT_AUTHORIZED


我也成功登录过,但仍显示为未授权。这是我的代码。

 使用GooglePlayGames; 
使用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(成功Google Play游戏);
}
else
{
mStatusText =验证失败。;
// ShowNextScene();
Debug.Log(失败的Google Play游戏);
}

});


$ b $ public void ShowScoreBoard()
{

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

当我检查用户是否被认证时,它返回true,当我调试它。但排行榜没有显示出来。有人可以帮助我解决这个错误。提前致谢。如果 EnableSavedGames()在Builder()中使用,那么您需要开发人员控制台中的 SavedGames 支持,并在 API控制台项目中启用 Drive API 。所有这些都将是开发者控制台中的游戏详情页面。



确保您的计算机上没有多个 debug.keystore
,开发者控制台上的SHA1和构建应该相同


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.

解决方案

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

这篇关于将分数发布到Unity3d中的排行榜后,Google Play排行榜不会显示的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆