2017-05-24 177 views
-2

使用android版本6.0,play-games-plugin-for-unity v0.9.38a,unity 5.6.0f3。UNITY:从Google Play商店下载Google Play认证失败

建立和Android手机工作PC直接运行。意味着我在谷歌播放控制台的设置和统一是正确的。

但之后,我删除应用程序并从谷歌Play商店下载,谷歌的付费认证没有工作的。

我很好奇为什么直接从电脑工作,但从下载谷歌播放店不能? 任何人都有这个相同的问题?

这是代码。

using GooglePlayGames; 
using GooglePlayGames.BasicApi; 

..... 
    void Start() { 
     // Create client configuration 
     PlayGamesClientConfiguration config = new 
      PlayGamesClientConfiguration.Builder() 
      .Build(); 

     // Enable debugging output (recommended) 
     PlayGamesPlatform.DebugLogEnabled = true; 

     // Initialize and activate the platform 
     PlayGamesPlatform.InitializeInstance(config); 
     PlayGamesPlatform.Activate(); 


     PlayGamesPlatform.Instance.Authenticate(SignInCallback, false); 


    } 

    public void SignInCallback(bool success) { 
     if (success) { 
      txtUserName.text = Social.localUser.userName; 
      isSignIn = true; 
      txtSignInOut.text = "Sign Out"; 
      btnShowTopScore.SetActive (true); 
     } else { 
      txtUserName.text = ""; 
      isSignIn = false; 
      btnShowTopScore.SetActive (false); 
     } 
    } 
+0

希望这会有所帮助,它解决了我的问题。 检出: - https://stackoverflow.com/questions/44153675/google-play-games-service-error-not-authorized-when-rollout-for-beta-unity3/44235859#44235859 –

回答

0

感谢Github的问题,我终于解决了这个问题。问题是发生在谷歌应用登录

https://github.com/playgameservices/play-games-plugin-for-unity/issues/1754#issuecomment-304581707

我做了什么:

谷歌游戏控制台 - >选择您的应用程序 - >发布管理 - >应用程序签名 - >应用程序签名证书:复制SHA-1(不复制单词'SHA1:')

打开console.developers.google.com,选择您的项目 - >凭证 - > OAuth 2.0客户端ID - >编辑OAuth客户端 - >签名证书指纹 - >用复制的SHA1 - >保存替换旧的SHA1。

打开你的游戏,你应该登录 - >电子邮件选择 - >选择测试人员的电子邮件。 Google Play游戏服务现在应该可以正常运行。

这里是博客,以防有人需要它。

https://kyokurosagi.blogspot.my/2017/05/unity-local-login-with-unity-android.html