使用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 –