【问题标题】:Google Play Leaderboard not showing up after posting score to leaderboard in Unity3d在 Unity3d 中将分数发布到排行榜后,Google Play 排行榜未显示
【发布时间】:2016-04-29 08:18:11
【问题描述】:

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

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)

我遇到了这样的错误

调试:收到 UI 回调:ERROR_NOT_AUTHORIZED

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

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");
}

当我检查用户是否通过身份验证时,当我调试它时它返回 true。但是排行榜没有出现。有人可以帮我解决这个错误吗?提前致谢。

【问题讨论】:

    标签: unity3d google-play-services leaderboard


    【解决方案1】:

    如果 EnableSavedGames() 在 Builder() 中使用,那么您需要在 开启 SavedGames 支持>开发者控制台,并在“API 控制台项目”中启用Drive API开发者控制台中的“游戏详情”页面可以访问所有这些内容。

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

    【讨论】:

    • 启用保存的游戏在开发者控制台中被关闭。开发人员控制台的 API 控制台项目中没有任何可启用的内容。我找不到驱动器 API。你能帮帮我吗?
    • 打开而不是关闭
    • 我已经打开了,但仍然没有加载排行榜。
    • 检查开发者控制台上的 SHA1 是否与构建不同
    • 我已经在 unity 项目中添加了发布密钥库,因为该项目即将发布。使用发布密钥库创建一个 SHA1 密钥,并在 google play 开发者控制台中给出 sha1。
    猜你喜欢
    • 2013-10-31
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2018-01-05
    • 2018-02-07
    • 2018-07-18
    • 2023-04-03
    • 1970-01-01
    相关资源
    最近更新 更多