I'm trying to simply log into google play game services and the get a achievement. Here is the code :
using UnityEngine;
using System.Collections;
using GooglePlayGames;
using UnityEngine.SocialPlatforms;
public class Achievements : MonoBehaviour {
public static string testAch = " CgkI0PrljMcBEAIQAQ";
public static string testIncrAch = "CgkI0PrljMcBEAIQAg";
// Use this for initialization
void Start () {
if (Application.platform == RuntimePlatform.Android)
{
PlayGamesPlatform.DebugLogEnabled = true;
PlayGamesPlatform.Activate();
Social.localUser.Authenticate((bool success) =>
{
if (success)
{
Debug.Log("Successes on login to google play games");
Social.ReportProgress(testAch, 100, (bool successAch) =>
{
//Ach unlocked
Debug.Log("tEST AHC UNLOCKED");
});
}
else { Debug.Log("Login to google play games failed"); }
});
Social.ShowAchievementsUI();
}
}
// Update is called once per frame
void Update () {
}
}
I'm getting the following error code : DEBUG: Starting Auth Transition. OP: SIGN_IN status: ERROR_TIMEOUT. It tries two times and the the auth failes. Any ideas why this is happening. I'm pretty sure I set it up in the developer console correctly.