0 c# android unity-game-engine google-play-games unity5
我在Unity中开发的游戏中没有验证GPGS的问题.
屏幕截图: 在imgur.com上查看帖子
发生次数如下:
1.连接到游戏
2. GOOGLE PLAY GAMES窗口弹出并消失(图像上方)
3.出现加载圈然后消失
我在手机上运行了adb logcat,下面是该区域的片段,我认为是问题所在:
04-30 09:45:10.023 11290 11316 W Unity :
04-30 09:45:10.023 11290 11316 W Unity : (Filename: ./artifacts/generated/common/runtime/DebugBindings.gen.cpp Line: 51)
04-30 09:45:10.023 11290 11316 W Unity :
04-30 09:45:10.044 3470 28977 W GamesServiceBroker: Client connected with SDK 8487000, Services 10298448, and Games 39080048
04-30 09:45:10.058 3470 28977 W GamesServiceBroker: Client connected with SDK 8487000, Services 10298448, and Games 39080048
04-30 09:45:10.065 3470 28976 W GamesServiceBroker: Client connected with SDK 8487000, Services 10298448, and Games 39080048
04-30 09:45:10.073 3470 11371 V AccountUtils: 0 accounts found with uca feature
04-30 09:45:10.081 3470 28976 W GamesServiceBroker: Client connected with SDK 8487000, Services 10298448, and Games 39080048
04-30 09:45:10.124 3470 28977 W GamesServiceBroker: Client connected with SDK 8487000, Services 10298448, and Games 39080048
04-30 09:45:10.126 3470 28976 W GamesServiceBroker: Client connected with SDK 8487000, Services 10298448, and Games 39080048
04-30 09:45:10.270 2097 2892 I BroadcastQueue: am_broadcast_enqueue: [background,0,Intent { act=com.facebook.messages.ipc.peersPROD flg=0x10 (has extras) },2]
04-30 09:45:10.270 2097 2141 I BroadcastQueue: am_broadcast_finished: [background,0,Intent { act=com.facebook.messages.ipc.peersPROD flg=0x10 (has extras) }]
04-30 09:45:10.276 20864 21291 W Auth : [GetToken] GetToken failed with status code: UNREGISTERED_ON_API_CONSOLE
04-30 09:45:10.282 3470 27320 E TokenRequestor: You have wrong OAuth2 related configurations, please check. Detailed error: UNREGISTERED_ON_API_CONSOLE
04-30 09:45:10.294 3470 28976 W GamesServiceBroker: Client connected with SDK 8487000, Services 10298448, and Games 39080048
04-30 09:45:10.301 3470 28977 W GamesServiceBroker: Client connected with SDK 8487000, Services 10298448, and Games 39080048
04-30 09:45:10.302 11290 11290 V GamesNativeSDK: Play Games callback indicates connection failure.
04-30 09:45:10.302 11290 11368 I GamesNativeSDK: UI interaction required to connect to Google Play.
04-30 09:45:10.339 11290 11368 I GamesNativeSDK: Auth operation started: SIGN IN
04-30 09:45:10.339 11290 11368 I GamesNativeSDK: Connecting to Google Play...
04-30 09:45:10.346 3470 7470 W GamesServiceBroker: Client connected with SDK 10084000, Services 10298448, and Games 39080048
04-30 09:45:10.358 3470 28977 W GamesServiceBroker: Client connected with SDK 8487000, Services 10298448, and Games 39080048
04-30 09:45:10.366 3470 28977 W GamesServiceBroker: Client connected with SDK 8487000, Services 10298448, and Games 39080048
04-30 09:45:10.373 3470 28976 W GamesServiceBroker: Client connected with SDK 8487000, Services 10298448, and Games 39080048
04-30 09:45:10.383 3470 11371 V AccountUtils: 0 accounts found with uca feature
04-30 09:45:10.391 3470 28976 W GamesServiceBroker: Client connected with SDK 8487000, Services 10298448, and Games 39080048
04-30 09:45:10.410 3470 28976 W GamesServiceBroker: Client connected with SDK 8487000, Services 10298448, and Games 39080048
04-30 09:45:10.427 3470 28976 W GamesServiceBroker: Client connected with SDK 8487000, Services 10298448, and Games 39080048
04-30 09:45:10.517 20864 10927 W Auth : [GetToken] GetToken failed with status code: UNREGISTERED_ON_API_CONSOLE
04-30 09:45:10.518 3470 27320 E TokenRequestor: You have wrong OAuth2 related configurations, please check. Detailed error: UNREGISTERED_ON_API_CONSOLE
04-30 09:45:10.545 3470 28977 W GamesServiceBroker: Client connected with SDK 8487000, Services 10298448, and Games 39080048
04-30 09:45:10.547 2097 2171 I art : Starting a blocking GC Explicit
04-30 09:45:10.548 3470 28976 W GamesServiceBroker: Client connected with SDK 8487000, Services 10298448, and Games 39080048
04-30 09:45:10.550 11290 11290 V GamesNativeSDK: Play Games callback indicates connection failure.
04-30 09:45:10.550 11290 11368 I GamesNativeSDK: UI interaction required to connect to Google Play.
04-30 09:45:10.550 11290 11368 I GamesNativeSDK: Resolving connection.
Run Code Online (Sandbox Code Playgroud)
似乎游戏在API控制台中未注册,来自上面的logcat.我在这里看到了这个答案,然后在Developer Console和API控制台上检查了我的OAuth2客户端ID,它们是相同的.我也在使用测试人员帐户.
让我感到困惑的是,我去年开发的游戏没有问题(使用Unity 5.4.2和GPGS版本0.9.35)但我目前正在做的游戏正在经历这个(使用Unity 5.6和GPGS版本0.9.36),以及因此,我真的不想推迟计划.
有人在网上给出了将SDK Tools和Google Repository更新到最新版本的建议,但它只是让Unity无法列出sdk版本.我不得不将SDK Tools降级到25.2.5,将Google Repo降级到41.0.0.
我尝试将GPGS35导入到项目中,这会导致构建错误,并且最新版本(GPGS37)被破坏.我还将该项目降级为Unity 5.4.2,带来灾难性后果.
我不确定这是否与问题有关,因为这与我之前为游戏启动GPGS完全相同的代码(调试是/否除外):
void Start () {
PlayGamesClientConfiguration config = new PlayGamesClientConfiguration.Builder ()
.EnableSavedGames ()
.Build ();
PlayGamesPlatform.InitializeInstance (config);
PlayGamesPlatform.DebugLogEnabled = true;
PlayGamesPlatform.Activate ();
}
public static void Login () {
Social.localUser.Authenticate ((bool success) => {
if (success) {
MenuManager.instance.gpgsDebugText.text = "yes";
}
else {
MenuManager.instance.gpgsDebugText.text = MenuManager.instance.gpgsDebugText.text + "no";
}
});
}
Run Code Online (Sandbox Code Playgroud)
我希望有人能够回答,当游戏离完成只有一步之遥时会很烦人,并且试图解决这个问题已经失去了20多个小时.
非常感谢您的宝贵时间!
小智 6
首先去谷歌播放控制台..选择你的应用程序..并转到发布管理下的应用程序签名.你会在这里找到两个证书.1. app签名证书2.从这里上传证书你需要签署SHA-1证书的应用程序.现在去google api console.你会发现你的游戏选择它.你会发现这里的sha1与你上传证书的sha1相同.但是你需要在这里粘贴你的签名sha1证书.你会很高兴去的.希望它会有所帮助.
| 归档时间: |
|
| 查看次数: |
2048 次 |
| 最近记录: |