查找用户是否取消了身份验证(Google Play Game Services for Unity3d)



我在我的Unity游戏中执行了Google Play Game Services。自动用户认证(登录)发生在游戏会话的开始。但如果用户在第一次取消身份验证过程,那么在以后的游戏会话中就不会有身份验证相关的调用。如何发现用户是否取消了身份验证?

我使用Unity插件在这里找到:https://github.com/playgameservices/play-games-plugin-for-unity

根据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.

如您所见,如果身份验证失败,Authenticate方法将使用false参数调用回调。

最新更新