My google Play Games Plugin Fails to authenticate in the editor, also does not work even when I build the game. Is it common to fail in the editor? How to make it work. Here is the code I am using.
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using GooglePlayGames;
using GooglePlayGames.BasicApi;
public class LeaderBoard_Setup : MonoBehaviour
{
public static LeaderBoard_Setup Instance;
[HideInInspector] public bool connectedToGooglePlay;
private void Awake()
{
Instance = this;
DontDestroyOnLoad(this.gameObject);
PlayGamesPlatform.DebugLogEnabled = true;
PlayGamesPlatform.Activate();
}
void Start()
{
LoginToGooglePlay();
}
void LoginToGooglePlay()
{ PlayGamesPlatform.Instance.Authenticate(ProcessAuthentication);
}
void ProcessAuthentication(SignInStatus status)
{
if(status== SignInStatus.Success)
{
connectedToGooglePlay = true;
}
else
{
connectedToGooglePlay = false;
Debug.Log("Playconsole connection fail");
}
}
}