Unity Spain

Post Antiguos => General (Antiguo) => Mensaje iniciado por: Superkorlas en Junio 24, 2016, 05:37:54 PM

Título: Problemas con la autenticación al usar los servicios de Google Play:
Publicado por: Superkorlas en Junio 24, 2016, 05:37:54 PM
Hola a todos, llevo ya bastante con un problema y la verdad que no se que más hacer, así que agradecería muchísimo cualquier ayuda. El problema es el siguiente, al utilizar los servicios de Google Play Service (el ultimo plugin v0.9.34) nunca me deja autenticar (no solo en el editor, en el dispositivo tampoco). Este es el código:
 

using UnityEngine;
using UnityEngine.SceneManagement;
using UnityEngine.UI;
using UnityEngine.Advertisements;
using System.Collections;
using System.Collections.Generic;
using GooglePlayGames;
using UnityEngine.SocialPlatforms;
using GooglePlayGames.BasicApi;
using UnityEngine.Analytics;
public class Menu : MonoBehaviour {
public Text record;
    //Para testear si se ha conseguido autenticar
public GameObject test;
/**
    Indicador del jugador de que no ha iniciado sesión, y no podrá acceder al  ranking ni a los logros.
 */
public GameObject signIn;
 
void Start()
{      
   PlayGamesClientConfiguration config = new PlayGamesClientConfiguration.Builder ().Build ();
   PlayGamesPlatform.InitializeInstance(config);
   GooglePlayGames.PlayGamesPlatform.DebugLogEnabled = true;
   GooglePlayGames.PlayGamesPlatform.Activate ();
 
   Advertisement.Initialize ("CORRECT_NUMBER", true);
   test.SetActive (false);
   SignIn ();
   if (PlayerPrefs.HasKey("record"))
   {
      record.text = "Record actual: " + PlayerPrefs.GetInt("record");
      Analytics.CustomEvent ("Start Play", new Dictionary<string, object>{ { "Record", PlayerPrefs.GetInt("record")} });
   } else {
         record.text = "Consigue un record!!";
   }
}
public void OnPlay()
{
   ShowAd ();
   SceneManager.LoadScene("Jugar");
   Time.timeScale = ;
}
public void OnArchievements()
{
   if (Social.Active.localUser.authenticated) {
      Social.Active.ShowAchievementsUI ();
   } else {
      Social.Active.localUser.Authenticate ((bool success) => {
         if (success) {
            Social.Active.ShowAchievementsUI ();         
         }
      });
   }
}
public void OnMatching()
{
   if (Social.Active.localUser.authenticated) {
      Social.Active.ShowLeaderboardUI ();
   } else {
      Social.Active.localUser.Authenticate ((bool success) => {
         if (success) {
            Social.Active.ShowLeaderboardUI ();      
         }
      });
   }
}
public void OnExit()
{
   Analytics.CustomEvent ("Stop Play", new Dictionary<string, object>{ { "Record", PlayerPrefs.GetInt("record")} });
   Application.Quit();
}
public void SignIn()
{
   Social.Active.localUser.Authenticate (ProcessAuthentication);
}
public void Later()
{
   signIn.SetActive (false);
}
public void ShowAd()
{
   if (Advertisement.IsReady())
   {
      Advertisement.Show();
   }
}
void ProcessAuthentication (bool success)
{
   if (true == success)
   {
      Debug.Log ("AUTHENTICATED!");
      if (Social.Active.localUser.authenticated)
      {
         Social.Active.LoadAchievements (ProcessLoadedAchievements);
         Social.Active.LoadScores (Fireball.GPGSIds.leaderboard_ranking, ProcessLoadedScores );
         if (PlayerPrefs.HasKey ("record"))
         {
            Social.Active.ReportScore (PlayerPrefs.GetInt ("record"),Fireball.GPGSIds.leaderboard_ranking, (bool report) => { });
         }
         signIn.SetActive (false);
         test.SetActive (true);
      }
   } else {
      Debug.Log("Failed to authenticate");
      signIn.SetActive (true);
   }
}
void ProcessLoadedAchievements (IAchievement[] achievements)
{
   if (achievements.Length == )
   {
      Debug.Log ("Error: no achievements found");
   }
   else
   {
      Debug.Log ("Got " + achievements.Length + " achievements");
   }
}
void ProcessLoadedScores (IScore[] scores)
{
   if (scores.Length == )
   {
      Debug.Log ("Error: no scores found");
   }
   else
   {
      Debug.Log ("Got " + scores.Length + " scores");
   }
}
}

 
En la consola este es el debug que sale:
 
       DEBUG: Activating PlayGamesPlatform.
 
       DEBUG: PlayGamesPlatform activated: GooglePlayGames.PlayGamesPlatform.
 
       DEBUG: Creating platform-specific Play Games client.
 
       DEBUG: Creating IPlayGamesClient in editor, using DummyClient.
 
       DEBUG: Received method call on DummyClient - using stub implementation.
 
¿Alguien puede ayudarme? No sé en qué estoy fallando... 
 
Muchas gracias por adelantado.
Título: Problemas con la autenticación al usar los servicios de Google Play:
Publicado por: Bamf en Abril 04, 2017, 06:16:46 PM
Es un error que por ahora lo tenemos todo el mundo. Puedes comprobarlo en el hilo de Github. Estamos todos esperando un milagro porque sinceramente esto me está atrasando muchos planes. https://github.com/playgameservices/play-games-plugin-for-unity/issues (https://github.com/playgameservices/play-games-plugin-for-unity/issues)
Título: Problemas con la autenticación al usar los servicios de Google Play:
Publicado por: Superkorlas en Abril 18, 2017, 11:08:21 AM
Cita de: Clownsyyy date=1491322606Es un error que por ahora lo tenemos todo el mundo. Puedes comprobarlo en el hilo de Github. Estamos todos esperando un milagro porque sinceramente esto me está atrasando muchos planes. https://github.com/playgameservices/play-games-plugin-for-unity/issues (https://github.com/playgameservices/play-games-plugin-for-unity/issues)
   


Pff, pues si, a ver si lo arreglan rápido o algo porque lleva ya bastante tiempo el problema....
 
Gracias por la respuesta.
 
Saludos