public void Save() { EnvPaths.SetInstalationPath(PathField.text); EnvPaths.SetMapsPath(MapsPathField.text); EnvPaths.SetBackupPath(BackupPathField.text); PlayerPrefs.SetInt(UndoHistory, (int)HistorySlider.value); if (History) { History.MaxHistoryLength = (int)HistorySlider.value; } PlayerPrefs.SetInt("PlayMap_Faction", PlayAs.value); PlayerPrefs.SetInt("PlayMap_FogOfWar", FogOfWar.isOn ? 1 : 0); if (GetMarkers2D() != Markers2D.isOn) { if (Markers2D.isOn) { } else { Markers.MarkersControler.ForceResetMarkers2D(); } PlayerPrefs.SetInt("Markers_2D", Markers2D.isOn ? 1 : 0); } PlayerPrefs.Save(); gameObject.SetActive(false); }
public void Save() { if (string.IsNullOrEmpty(PathField.text)) { GenericInfoPopup.ShowInfo("Game installation path can't be empty!"); } else { EnvPaths.SetInstalationPath(PathField.text); } if (string.IsNullOrEmpty(MapsPathField.text)) { GenericInfoPopup.ShowInfo("Maps folder path can't be empty!"); } else { EnvPaths.SetMapsPath(MapsPathField.text); } EnvPaths.SetBackupPath(BackupPathField.text); PlayerPrefs.SetInt(UndoHistory, (int)HistorySlider.value); if (History) { History.MaxHistoryLength = (int)HistorySlider.value; } PlayerPrefs.SetInt("PlayMap_Faction", PlayAs.value); PlayerPrefs.SetInt("PlayMap_FogOfWar", FogOfWar.isOn ? 1 : 0); if (GetMarkers2D() != Markers2D.isOn) { if (Markers2D.isOn) { } else { Markers.MarkersControler.ForceResetMarkers2D(); } PlayerPrefs.SetInt("Markers_2D", Markers2D.isOn ? 1 : 0); } if (GetHeightmapClamp() != HeightmapClamp.isOn) { PlayerPrefs.SetInt("Heightmap_Clamp", HeightmapClamp.isOn ? 1 : 0); } PlayerPrefs.SetFloat("UiScale", UiScale.value); PlayerPrefs.Save(); gameObject.SetActive(false); }
public void Save() { EnvPaths.SetInstalationPath(PathField.text); EnvPaths.SetMapsPath(MapsPathField.text); EnvPaths.SetBackupPath(BackupPathField.text); PlayerPrefs.SetInt(UndoHistory, (int)HistorySlider.value); if (History) { History.MaxHistoryLength = (int)HistorySlider.value; } PlayerPrefs.SetInt("PlayMap_Faction", PlayAs.value); PlayerPrefs.SetInt("PlayMap_FogOfWar", FogOfWar.isOn?1:0); PlayerPrefs.Save(); gameObject.SetActive(false); }