Hi, for 3 months I’ve been trying to implement the Google Play Games account login in my game, but it’s failing at :
PlayGamesPlatform.Instance.Authenticate((success) =>
{
if (success == SignInStatus.Success)
{
Debug.Log("Login with Google Play games successful.");
PlayGamesPlatform.Instance.RequestServerSideAccess(true, code =>
{
Debug.Log("Authorization code: " + code);
Token = code;
// This token serves as an example to be used for SignInWithGooglePlayGames
});
}
else
{
Debug.LogWarning("LoginGooglePlayGames Unsuccessful");
}
});
and I get the “LoginGooglePlayGames Unsuccessfull” debugLog
what I’ve done:
-Sign up for UGS
-Link my dashboard to a Unity Editor project.
-Install the SDK in my game code. (ver 3.3.0)
-Initialize the SDK. (the initialization seems to work since I get the “Initialized” debugLog)
-Install the Google Play Games plugin for Unity ver11.01
-I have setup my Google Play Developer Console with my app (same for my OAuth 2.0 Client IDs in the developer console)
-I have set the credential in the Google Play Developer Console with the Android credential for the Android part and the web client credential for the Game server credential part
-Setup the Google Play Games plugin in Unity (with the resources obtained from the developer console and my web client credential)
-Setup Google Play Games plugin nearby connections (with my game package)
-Setup my Identity providers (with my web client credential)
-Resolve android Dependencies
the code I’m using is exactly the one found at :
https://docs.unity.com/ugs/en-us/manual/authentication/manual/platform-signin-google-play-games
Questions I have:
-Why can’t I get PlayGamesPlatform to authenticate?
-What are the differences between LoginGooglePlayGames and SignInWithGooglePlayGamesAsync?
-Is the authCode needed by SignInWithGooglePlayGamesAsync the Token got from the code on top?
async Task SignInWithGooglePlayGamesAsync(string authCode)
-Since I’m using the web client credential everywhere where do I need to use the Android credential?
-What happens if I try logging in to Google Play Games when I’m signed in anonymously?
Thanks for any help.