For some unknown reasons player can’t authenticate. Authentication process neither fails nor succeeds. Just stuck in the ‘authenticating’ phase. Authentication UI doesn’t show up. Did everything required from the Google Developer Console (like… adding tester ids, linking app, creating leaderboards and all that…)
Did this a month ago, worked then perfectly. Anyone else having this issue or it’s just me doing something wrong.
The simplest and most stable solution in my opinion is go to SDK manager and conduct all the updates available. This worked for me after trying more than 30 solutions from all the forums available.
I was having the same problems and the solution in this thread fixed it. The google-play-services-lib was updated recently and the classes in the jar files are looking for the old version.
For others that ended up with the same problem than me, having always returned loggin fail
this issue had the solution that was to had my account as tester in Google Play Developer Console → Game Services → Testing.
Also I have a similar problem related to authentication googleplaygames. I’ve done testing on an empty project, just right to check authentication, and everything runs normally, however when I try to do in an existing project occurs execeção the XmlException kind that makes reference to the following file: Assets / GooglePlayGames / Editor / BackgroundResolucion.cs in line 40.
I do not know if this is the exception that is causing the error in the application of authentication, but everything leads me to believe so, since the test project I created, this exception does not occur.
I’m also integrating the Unity ADS in the project. I do not know if this might be interfering.
Anyone had any similar problem?
How to solve the issue?
Thank you very much in advance.
I expirienced exact same issue. I use plugin version 0.9.35 and Unity 5.3.2f1.
Then after I tried out all that internet can suggest to me, regarding my issue, I installed Unity 5.4.3 f1 and get my working authentication.
Hope it helps.
After importing the most recent package from the link in the question I simply added my Google Play Games ID in the menu option at the top and then wrote a script, something like the following, and attached it to a Gameobject in my first scene.
I could then call the various functions using ‘GPG.gpgInstance.{function_name()}’ from the rest of my code.
using UnityEngine;
using System.Collections;
using GooglePlayGames;
public class GPG : MonoBehaviour {
static public GPG gpgInstance;
public bool signInTried; // Call this using if(GPG.gpgInstance.singInTried) ... to test whether or not user is signed in to GPG
void Awake(){
DontDestroyOnLoad (this.gameObject);
if (gpgInstance != null){
Debug.LogError("Multiple instances of GPG!");
}
gpgInstance = this;
}
void Start ()
{
PlayGamesPlatform.Activate ();
}
public void GPGSignIn()
{
Social.localUser.Authenticate ((bool success) => {
if(success){
signInTried = true;
}else{
signInTried = false;
}
});
}
public void ScoreToLeaderboard(long lscore)
{
Social.ReportScore (lscore, lboard, (bool success)=>{
if(success){
ShowScoreLeaderboard();
}
});
}
public void ShowScoreLeaderboard()
{
PlayGamesPlatform.Instance.ShowLeaderboardUI(lboard);
}
public void GPGSignOut()
{
if (signInTried) {
((PlayGamesPlatform)Social.Active).SignOut ();
signInTried = false;
}
}