2017-05-24 181 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