playgameservices / play-games-plugin-for-unity

Google Play Games plugin for Unity
Other
3.46k stars 965 forks source link

Google Play Games Log in returning Cancelled? #2963

Closed ghost closed 3 years ago

ghost commented 3 years ago

Hi there, I am currently trying to setup google play games in my game project. I have put my account in the testers section, published the configurations, tried switch authentication function from: PlayGamesPlatform.Instance.Authenticate(); to: Social.localUser.Authenticate();

In the unity console on my phone, it will return Cancelled for PlayGamesPlatform and false for Social.localUser.

Heres my code:

     PlayGamesClientConfiguration client = new PlayGamesClientConfiguration.Builder()
    .EnableSavedGames()
    .RequestEmail()
    .RequestServerAuthCode(false)
    .RequestIdToken()
    .Build();

    PlayGamesPlatform.InitializeInstance(client);
    PlayGamesPlatform.DebugLogEnabled = true;
    PlayGamesPlatform.Activate();

    Social.localUser.Authenticate((result) =>
    {
        Debug.Log(result);
    });

Thanks!

ghost commented 3 years ago

Fixed it, Deleted the four lines below client.builder()