C# Google Play Games Service Unity插件不允许我选择与Gamesparks集成的帐户

C# Google Play Games Service Unity插件不允许我选择与Gamesparks集成的帐户,c#,unity3d,google-play,google-play-games,C#,Unity3d,Google Play,Google Play Games,我在三天内面临着这个问题。我不知道我犯了什么错误 我也用gamesparks实现了GPGS插件。登录成功。但这里有一点很奇怪,就是GPGS不允许我选择一个GPGS帐户,即使我有4个帐户 据我所知,当使用GPGS登录时,第一次登录将尝试让我们选择使用哪个帐户登录。 但在我的问题上,无论我做什么,在playstore切换帐户,在google play games切换帐户。第一次登录总是使用相同的帐户登录 例如: 我在playstore有4个帐户 A@gmail.com B@gmail.com C@g

我在三天内面临着这个问题。我不知道我犯了什么错误

我也用gamesparks实现了GPGS插件。登录成功。但这里有一点很奇怪,就是GPGS不允许我选择一个GPGS帐户,即使我有4个帐户

据我所知,当使用GPGS登录时,第一次登录将尝试让我们选择使用哪个帐户登录。

但在我的问题上,无论我做什么,在playstore切换帐户,在google play games切换帐户。第一次登录总是使用相同的帐户登录

例如:

我在playstore有4个帐户

  • A@gmail.com
  • B@gmail.com
  • C@gmail.com
  • D@gmail.com
  • 当我尝试使用GPGS登录时,第一次登录总是选择A@gmail.com登录。当我尝试卸载游戏,然后尝试登录时。再次总是A@gmail.com选择登录。我不知道这有什么问题。我再次在playstore切换了帐户,但仍然得到了相同的A@gmail.com登录。没有弹出窗口让我首先选择我要选择的帐户

    下面是我的代码:

    public void GooglePlusStart()
        {
            //Start the Google Plus Overlay Login
    
            Social.Active.localUser.Authenticate((bool success) => {
                if(success) {
                    log.text = "SUCCESS AUTHENTICATED";
                    GooglePlayAuthentication();
                } else{
                    log.text = "FAILED AUTHENTICATED";
                }
                //Do something depending on the success achieved
            });
    
        }
    
    public void GooglePlayAuthentication() {
            if(PlayGamesPlatform.Instance.IsAuthenticated()) {
                    PlayGamesPlatform.Instance.GetServerAuthCode ((status, code) => {
                        string displayName = PlayGamesPlatform.Instance.GetUserDisplayName();
                        string email  = PlayGamesPlatform.Instance.GetUserEmail();
                        new GooglePlayConnectRequest ()
                            .SetCode (code)
                             //.SetAccessToken (PlayGamesPlatform.Instance.GetAccessToken ())
                            .SetDoNotLinkToCurrentPlayer (false)
                            .SetSwitchIfPossible(true)
                            .SetRedirectUri ("http://www.gamesparks.com/oauth2callback")
                            .SetDisplayName(displayName)
                            .Send ((googleplayAuthResponse) => {
                            if (!googleplayAuthResponse.HasErrors) {
                                    Debug.Log (googleplayAuthResponse.DisplayName + " Logged In !");
                                    log.text = "SUCCESSSSS    EMAIL : " + email + " ====== Status : " + status + "  ==== Code : " + code + " ====== " + "AccessToken : " + PlayGamesPlatform.Instance.GetAccessToken () + " ==== " + googleplayAuthResponse.DisplayName + "   :   " + googleplayAuthResponse.UserId + "   :   " + "Logged In! \n " + googleplayAuthResponse.JSONString;
                                } else {
                                    Debug.Log ("Failed To Login");
                                    log.text = "ERRRRORRRR    EMAIL : " + email + " ====== Status : " + status + " ==== Code : " + code + " ====== " + "AccessToken : " + PlayGamesPlatform.Instance.GetAccessToken () + " ==== " + googleplayAuthResponse.JSONString;
                                }
                            });
                    });
            } else {
                log.text = "Google Play Login Failed";
            }
        }
    
    如果像这种情况,我当然不能将保存的游戏转移到其他设备

    到目前为止我犯了什么错误

    任何帮助都将不胜感激

    谢谢

    丹尼斯找到了解决办法

    请参见下面的屏幕截图:

    当我勾选“启用Google Plus API访问”时,它起了作用