我上顯示保存的遊戲ui.Here得到以下異常是我的代碼:之前,您必須啓用保存的遊戲它可以:Google Play遊戲服務| ShowSelectSavedGameUI統一的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 /統一(32369):在GooglePlayGames.Native.UnsupportedSavedGamesClient.ShowSelectSavedGameUI(System.String uiTitle,UInt32的maxDisplayedSavedGames,布爾showCreateSaveUI,布爾showDeleteSaveUI,System.Action`2回調)[0x00000]在:0 02-06 20:03:38.804:I/Unity(32369):在GameManager.ShowSelectGame()[0x00000]中:0
但是每次我都從登錄中獲得成功。
更新::通過PlayGamesPlatform.Activate()解決的問題;先進行Social.localUser.Authenticate。 – 2015-02-06 19:43:10