首页 > 解决方案 > SavedGames 启用 Unity 时 google play 服务的错​​误

问题描述

我正在尝试进行 gogle play 云保存,但是当我在代码中启用保存的游戏选项时,身份验证停止工作。可能是什么问题呢?如果我写这个连接将不会(( PlayGamesClientConfiguration config = new PlayGamesClientConfiguration.Builder().RequestServerAuthCode(false).EnableSavedGames().Build(); PlayGamesPlatform.DebugLogEnabled = true; PlayGamesPlatform.InitializeInstance(config);

adb logcat 
1C4
E/PlayGamesServices[SignInAuthenticator](32263): ** APP NOT CORRECTLY CONFIGURED TO USE GOOGLE PLAY GAME SERVICES
E/PlayGamesServices[SignInAuthenticator](32263): ** DEVELOPER_ERROR
E/PlayGamesServices[SignInAuthenticator](32263): ** This is usually caused by one of these reasons:
E/PlayGamesServices[SignInAuthenticator](32263): ** (1) Your package name and certificate fingerprint do not match
E/PlayGamesServices[SignInAuthenticator](32263): **     the client ID you registered in Developer Console.
E/PlayGamesServices[SignInAuthenticator](32263): ** (2) Your App ID was incorrectly entered.
E/PlayGamesServices[SignInAuthenticator](32263): ** (3) Your game settings have not been published and you are
E/PlayGamesServices[SignInAuthenticator](32263): **     trying to log in with an account that is not listed as
E/PlayGamesServices[SignInAuthenticator](32263): **     a test account.
E/PlayGamesServices[SignInAuthenticator](32263): ** (4) A server auth code was requested, but an incorrect client
E/PlayGamesServices[SignInAuthenticator](32263): **     id was provided. The client id for server auth codes should
E/PlayGamesServices[SignInAuthenticator](32263): **     be the client id for the game server (not the android app).

如果我写这段代码并发表评论

   //PlayGamesClientConfiguration config = new PlayGamesClientConfiguration.Builder().RequestServerAuthCode(false).EnableSavedGames().Build();
            PlayGamesPlatform.DebugLogEnabled = true;
            //PlayGamesPlatform.InitializeInstance(config);
            PlayGamesPlatform.Activate();
            Social.localUser.Authenticate((bool success) => {
               if(success)
                {
                    OpenSave(false);
                }
               else
                {
                    
                }
            });

一切正常,但保存到云端不起作用,请您帮忙?)我该如何解决这个问题?)

标签: c#androidunity3dgoogle-play-services

解决方案


推荐阅读