Skip to content
Snippets Groups Projects
Commit 6ef11386 authored by zohaib's avatar zohaib
Browse files

Merge branch 'master' of prod3.imt.hig.no:Kent/CityGen

parents b222b5ac 26b43d82
No related branches found
No related tags found
No related merge requests found
...@@ -7,7 +7,7 @@ using UnityEditor; ...@@ -7,7 +7,7 @@ using UnityEditor;
public class CityGenWindow : EditorWindow public class CityGenWindow : EditorWindow
{ {
[System.NonSerialized] [System.NonSerialized]
private string saveFolder = Application.persistentDataPath + "/CityData"; private string saveFolder;
[System.NonSerialized] [System.NonSerialized]
private bool citySelectionMenuEnabled = true; private bool citySelectionMenuEnabled = true;
[System.NonSerialized] [System.NonSerialized]
...@@ -15,6 +15,11 @@ public class CityGenWindow : EditorWindow ...@@ -15,6 +15,11 @@ public class CityGenWindow : EditorWindow
public List<string> entries = new List<string>(); public List<string> entries = new List<string>();
private void OnEnable()
{
saveFolder = Application.persistentDataPath + "/CityData";
}
public void OnGUI() public void OnGUI()
{ {
//MakeCitySelectionMenu(); //MakeCitySelectionMenu();
...@@ -53,7 +58,7 @@ public class CityGenWindow : EditorWindow ...@@ -53,7 +58,7 @@ public class CityGenWindow : EditorWindow
// Creates a directory in local disk. // Creates a directory in local disk.
System.IO.Directory.CreateDirectory(Application.persistentDataPath + "/CityData"); System.IO.Directory.CreateDirectory(Application.persistentDataPath + "/CityData");
// Write all the data to a file. // Write all the data to a file.
System.IO.File.WriteAllText(Application.persistentDataPath + this.saveFolder, stringDataAsJson); System.IO.File.WriteAllText(this.saveFolder, stringDataAsJson);
} }
// Load the data about city. // Load the data about city.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment