Я получаю следующее исключение на показ сохраненной игры ui.Here мой код:Службы Google Play | ShowSelectSavedGameUI Unity Android
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): at GameManager.ShowSelectGame() [0x00000] in: 0
Однако каждый раз, когда я получаю успех от входа в систему.
Обновление :: Проблема разрешена PlayGamesPlatform.Activate(); сначала, а затем Social.localUser.Authenticate. –