【发布时间】: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