使用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);
}
}
希望這會有所幫助,它解決了我的問題。 檢出: - https://stackoverflow.com/questions/44153675/google-play-games-service-error-not-authorized-when-rollout-for-beta-unity3/44235859#44235859 –