Hi all,
I can’t sign in to Google Play Services on my Android builds in Beta.
I’ve followed the instructions here:
I’ve copied and pasted the resource configuration into Android Setup, and Google Play Game Services says it has configured correctly.
I have a Sign In button I use to test this - which will make the Leaderboards and Achievements Button visible upon success:
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
using GooglePlayGames;
using UnityEngine.SocialPlatforms;
public class GPSActions : MonoBehaviour {
public Button leaderboardButton;
public Button achievementsButton;
// Use this for initialization
void Start () {
PlayGamesPlatform.Activate();
}
// Update is called once per frame
void Update()
{
}
public void GPSSignIn()
{
// authenticate user:
Social.localUser.Authenticate((bool success) =>
{
// handle success or failure
if (success)
{
Debug.Log("Authentication successful");
string userInfo = "Username: " + Social.localUser.userName +
"
User ID: " + Social.localUser.id +
"
IsUnderage: " + Social.localUser.underage;
Debug.Log(userInfo);
achievementsButton.GetComponent<Button>().gameObject.SetActive(true);
leaderboardButton.GetComponent<Button>().gameObject.SetActive(true);
}
else
{
Debug.Log("Authentication failed");
}
});
}
However when I press ‘Sign In’ in my Android Beta, the Google Play Services window opens, the green circle rotates and then nothing happens.
I have made sure to add my email address to the Google Play Developer Console list of testers.
Is there anything I’m missing in the code above?
Thanks in advance!
Leo