Google玩游戏服务| ShowSelectSavedGameUI Unity android

Google Play game services | ShowSelectSavedGameUI Unity android

我在显示保存的游戏时遇到以下异常 ui.Here 是我的代码:

PlayGamesClientConfiguration config = new PlayGamesClientConfiguration.Builder()
            .EnableSavedGames()
                .Build();
        PlayGamesPlatform.InitializeInstance(config);

        // Activate the Play Games platform. This will make it the default
        // implementation of Social.Active
        PlayGamesPlatform.Activate();

        // Sign in to Google Play Games
        mAuthenticating = true;
        Social.localUser.Authenticate((bool success) => {
            mAuthenticating = false;
            if (success) {
                Debug.Log("Login successful!");
            } else {
                // no need to show error message (error messages are shown automatically
                // by plugin)
                Debug.LogWarning("Failed to sign in with Google Play Games.");
            }
        });

显示 UI 代码 ::

((PlayGamesPlatform)Social.Active).SavedGame.ShowSelectSavedGameUI("Save game progress",                                                                       1,true,false,SavedGameSelected);

NotImplementedException:您必须启用保存的游戏才能使用。参见 PlayGamesClientConfiguration.Builder.EnableSavedGames。 02-06 20:03:38.804: I/Unity(32369): 在 GooglePlayGames.Native.UnsupportedSavedGamesClient.ShowSelectSavedGameUI (System.String uiTitle, UInt32 maxDisplayedSavedGames, Boolean showCreateSaveUI, Boolean showDeleteSaveUI, System.Action`2 回调) [0x00000] in :0 02-06 20:03:38.804: I/Unity(32369): 在 GameManager.ShowSelectGame () [0x00000] in :0

但是每次我都从登录中获得成功。

通过将其分成两部分解决了这个问题, 在游戏开始调用激活平台。 然后调用登录。