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 static void LoadStructurePaths() { ICSharpCode.SharpZipLib.Zip.ZipConstants.DefaultCodePage = 0; EnvPaths.GenerateDefaultPaths(); if (string.IsNullOrEmpty(EnvPaths.GetInstalationPath())) { EnvPaths.GenerateGamedataPath(); EnvPaths.SetInstalationPath(EnvPaths.DefaultGamedataPath); } StructurePath = GetDataPath() + "/Structure/"; }
public static void LoadStructurePaths() { ICSharpCode.SharpZipLib.Zip.ZipConstants.DefaultCodePage = 0; EnvPaths.GenerateDefaultPaths(); if (string.IsNullOrEmpty(EnvPaths.GetInstalationPath())) { EnvPaths.GenerateGamedataPath(); EnvPaths.SetInstalationPath(EnvPaths.DefaultGamedataPath); } StructurePath = Application.dataPath + "/Structure/";; #if UNITY_EDITOR StructurePath = StructurePath.Replace("Assets", ""); #endif }
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); }
void Start() { Args = System.Environment.GetCommandLineArgs(); /* * for(int i = 0; i < Args.Length; i++) * { * Debug.Log(Args[i]); * } */ if (Args.Length > 0) { if (Args.Length == 3 && Args[1] == "-setInstalationPath") { EnvPaths.SetInstalationPath(Args[2]); //Debug.Log("Success! Instalation path changed to: " + Args[2]); } } //Debug.Log(Args.Length); //Debug.Log(Args[0]); if (Args.Length >= 6) { if (Args[1] == "-renderPreviewImage" || Args[1] == "-renderPreviewImageNoProps" || Args[1] == "-renderPreviewImageNoDecals" || Args[1] == "-renderPreviewImageNoPropsDecals") { GetGamedataFile.MipmapBias = -0.9f; bool Props = Args[1] == "-renderPreviewImage" || Args[1] == "-renderPreviewImageNoDecals"; bool Decals = Args[1] == "-renderPreviewImage" || Args[1] == "-renderPreviewImageNoProps"; int Widht = int.Parse(Args[2]); int Height = int.Parse(Args[3]); Debug.Log("Begin coroutine"); StartCoroutine(RenderImageAndClose(Props, Decals, Widht, Height, Args[4], Args[5])); } } }
void Awake() { ICSharpCode.SharpZipLib.Zip.ZipConstants.DefaultCodePage = 0; EnvPaths.GenerateDefaultPaths(); if (string.IsNullOrEmpty(EnvPaths.GetInstalationPath())) { EnvPaths.GenerateGamedataPath(); EnvPaths.SetInstalationPath(EnvPaths.DefaultGamedataPath); } Current = this; StructurePath = Application.dataPath + "/Structure/";; #if UNITY_EDITOR StructurePath = StructurePath.Replace("Assets", ""); #endif DecalsInfo.Current = DecalsMenu; PropsInfo.Current = PropsMenu; UnitsInfo.Current = UnitsMenu; }