I tried to follow the tutorial from Unity
I imported GooglePlayGamesPlugin-0.11.01.unitypackage and then, I added the GooglePlayGamesExampleScript, I added Play Games Services configuration resources to my game, I used the client ID from my web application credentials, then I tried again with the client ID from my android credentials, I created a keystore to identify the project and I created an aab build for my project which displays the results in a text box on the screen.
I created a new app on the Google Play Console, created a Play Games Services configuration and set up achievements.
I created Google Cloud OAuth 2.0 Client ID’s for a Web Application and Android Application using my package name and SHA1 fingerprint
I receive no errors and everything resolved well but I do get 42 logs from my Assets\ExternalDependencyManager\
Does anyone know what I may be doing wrong with authenticating with Google Play?
using GooglePlayGames;
using GooglePlayGames.BasicApi;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class GPGSManager : MonoBehaviour
{
[SerializeField] TMPro.TMP_Text content;
public string Token;
public string Error;
// Start is called before the first frame update
void Start()
{
content.text = "Start\n";
PlayGamesPlatform.Activate();
PlayGamesPlatform.Instance.Authenticate((success)=>
{
content.text += "finished\n"+ success.ToString()+"\n";
if (success == SignInStatus.Success)
{
Debug.Log("Login with Google Play games successful.");
content.text += "Login with Google Play games successful.";
PlayGamesPlatform.Instance.RequestServerSideAccess(true, code =>
{
Debug.Log("Authorization code: " + code);
content.text += "Authorization code: " + code;
Token = code;
// This token serves as an example to be used for SignInWithGooglePlayGames
});
}
else
{
Error = "Failed to retrieve Google play games authorization code";
Debug.Log("Login Unsuccessful");
content.text += "Login Unsuccessful";
}
});
}
}