static void Init() { // Get existing open window or if none, make a new one: TerrainEditor window = (TerrainEditor)GetWindow(typeof(TerrainEditor)); window.Show(); window.EditorInit(); }
private void SaveDefault() { List <string> jsonList = new List <string>(); foreach (TerrainLayer layer in _editLayers) { jsonList.Add(JsonUtility.ToJson(layer)); } try { File.WriteAllLines(LayerSerializer.DefaultJSONPath, jsonList); } catch (Exception e) { } TerrainEditor window = (TerrainEditor)GetWindow(typeof(TerrainEditor)); window.Show(); window.UpdateTerrainPreview(); }
static void Init() { // Get existing open window or if none, make a new one: window = (TerrainEditor)EditorWindow.GetWindowWithRect(typeof(TerrainEditor), new Rect(0, 0, 300, 520), false, "Terrain Generator"); window.Show(); }