using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using GooglePlayGames;
public class GoogleSign : MonoBehaviour
{
public void Start()
{
PlayGamesPlatform.Instance.Authenticate(ProcessAuthentication);
}
internal void ProcessAuthentication(SignInStatus status)
{
if (status == SignInStatus.Success)
{
// Continue with Play Games Services
}
else
{
// Disable your integration with Play Games Services or show a login button
// to ask users to sign-in. Clicking it should call
// PlayGamesPlatform.Instance.ManuallyAuthenticate(ProcessAuthentication).
}
}
}
I get an error and I don’t understand how to fix the problem.
error //// Assets\GoogleSign.cs(13,41): error CS0246: The type or namespace name 'SignInStatus' could not be found (are you missing a using directive or an assembly reference?)
I’ve tried several different codes but I feel like some functions are missing each time.
I happen to currently be working on the same thing (a proprietary wrapper around both GPG and GameCenter for use in my company.
GPG is annoying, because it often doesn’t really provide good feedback about what you’re doing wrong.
All I can tell you is to check the following link very carefully: Setting Up Google Play Games Services | Google Developers and to check the “avoiding common setup problems” at the bottom of that link as well.
Some other things to take note of:
Make sure you have the correct SHA-1 set
Make sure your account is added as a test account in all locations (Play Console & Cloud Platform)
Make sure ‘anti-piracy’ is OFF when debugging, as it will hold back any app trying to authenticate that wasn’t downloaded directly from the play store.