2
votes

I have Google Play Game Services implemented in my Unity game. Automatic user authentication(Sign In) takes place during the beginning of the game session. But if the user cancels the authentication process during the first time, then there would be no authentication related calls in the future game sessions. How do I find out if the user has canceled authentication?

And I am using the Unity plugin found here: https://github.com/playgameservices/play-games-plugin-for-unity

1
I believe the plugin allows you to authenticate through Unity's Social interface. So at the time of authentication, if it fails, you'll know not to make the authentication related calls (failure and cancellation can be seen as the same. You can check if the user is authenticated with ILocalUser.authenticated.Andy

1 Answers

0
votes

According to documentation of Authentication method in GooglePlayGames.PlayGamesPlatform:

    /// The callback to call when authentication finishes. It will be called
    /// with <c>true</c> if authentication was successful, <c>false</c>
    /// otherwise.

As you see, Authenticate method invokes your callback with a false parameter if authentication fails.