1

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

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.");
            }
        });

显示用户界面代码::

((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] :0 02-06 20:03:38.804:I / Unity(32369):在GameManager.ShowSelectGame()[0x00000]中:0

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

4

1 回答 1

0

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

于 2015-02-24T06:50:41.573 回答