public void DeleteSavedGame(SavedGameRequestStatus status, ISavedGameMetadata game) { if (status == SavedGameRequestStatus.Success) { ISavedGameClient savedGameClient = PlayGamesPlatform.Instance.SavedGame; savedGameClient.Delete(game); } else { // handle error } }
private void OnDeleteSavedGame(SavedGameRequestStatus status, ISavedGameMetadata game) { if (status == SavedGameRequestStatus.Success) { ISavedGameClient savedGameClient = PlayGamesPlatform.Instance.SavedGame; savedGameClient.Delete(game); } else { Debug.LogWarning("Error deleting Saved Game" + status); } }
static void DeleteSavedGame(SavedGameRequestStatus status, ISavedGameMetadata game) { #if UNITY_ANDROID && !UNITY_EDITOR if (status == SavedGameRequestStatus.Success) { ISavedGameClient savedGameClient = PlayGamesPlatform.Instance.SavedGame; savedGameClient.Delete(game); } else { // handle error } #endif }
public void OnDeleteSavedGame(SavedGameRequestStatus status, ISavedGameMetadata game) { ISavedGameClient savedGameClient = PlayGamesPlatform.Instance.SavedGame; if (status == SavedGameRequestStatus.Success) { Debug.Log("(Hangry) Deleting Game"); // delete the game. isCloudDataLoaded = true; savedGameClient.Delete(game); } else { Debug.Log("(Hangry) Cannot open Game to delete"); // handle error } }
public void DeleteSavedGame() //저장된 게임 지워버리기. { #if UNITY_ANDROID st = null; savedDate = null; savedGame = false; savedLang = E_Language.KOREAN; // if (!IsThereSavedGame()) return; if (false == PlayGamesPlatform.Instance.localUser.authenticated) { PlayGamesClientConfiguration config = new PlayGamesClientConfiguration.Builder().EnableSavedGames().Build(); PlayGamesPlatform.InitializeInstance(config); PlayGamesPlatform.DebugLogEnabled = true; PlayGamesPlatform.Activate(); Social.localUser.Authenticate((bool success, string msg) => { if (false == success) { Debug.Log("딜리트 실패 - 로그인 불가"); // return; } }); } ISavedGameClient saveClient = PlayGamesPlatform.Instance.SavedGame; saveClient.OpenWithAutomaticConflictResolution(Constant.saveFileNameInGPGSCloud, DataSource.ReadCacheOrNetwork, ConflictResolutionStrategy.UseMostRecentlySaved, (status, metaData) => { if (status != SavedGameRequestStatus.Success) { Debug.Log("삭제 실패 - 메타데이타 오픈 불가"); // return; } else { saveClient.Delete(metaData); } }); return; #else File.Delete(Constant.saveDataAllPath); #endif }