I am using the Google Play games plugin version 0.11.01
Here is the code I am using
[HideInInspector] public bool connectedToGooglePlay;
private void Awake()
{
Instance = this;
DontDestroyOnLoad(this.gameObject);
}
void Start()
{
//LoginToGooglePlay();
try
{
PlayGamesPlatform.DebugLogEnabled = true;
Social.localUser.Authenticate( (bool success) => {
//PlayGamesPlatform.Instance.Authenticate(ProcessAuthentication);
if (success)
{
connectedToGooglePlay = true;
Debug.Log("Playconsole connection sucess");
}
else
{
connectedToGooglePlay = false;
Debug.Log("Playconsole connection fail");
}
});
}
catch (Exception exception)
{
Debug.Log(exception + "Playconsole");
}
}
↧