private void ResetGameScene() { if (!Current.HasLoaded) { Current.Load(UpdateCardGame, LoadCards, LoadSetCards); if (Current.IsDownloading) { return; } } if (!string.IsNullOrEmpty(Current.Error)) { Debug.LogError(LoadErrorMessage + Current.Error); Messenger.Ask(LoadErrorPrompt, IgnoreCurrentErroredGame, Delete); return; } #if UNITY_WEBGL foreach (UnityCardGame game in AllCardGames.Values) { game.ReadProperties(); } #endif // Now is the safest time to set this game as the preferred default game for the player PlayerPrefs.SetString(PlayerPrefDefaultGame, Current.Id); // Each scene is responsible for adding to OnSceneActions, but they may not remove OnSceneActions.RemoveWhere((action) => action == null); foreach (UnityAction action in OnSceneActions) { action(); } }