void MultiplePerlin() { showMultiplePerlin = EditorGUILayout.Foldout(showMultiplePerlin, "Multiple Perlin"); if (showMultiplePerlin) { EditorGUILayout.LabelField("", GUI.skin.horizontalSlider); GUILayout.Label("Multiple Perlin Noise", EditorStyles.boldLabel); perlinParametersTable = GUITableLayout.DrawTable( perlinParametersTable, perlinParameters, GUITableOption.Reorderable(true)); EditorGUILayout.Space(); EditorGUILayout.Space(); EditorGUILayout.BeginHorizontal(); if (GUILayout.Button("+")) { terrain.AddNewPerlin(); } if (GUILayout.Button("-")) { terrain.RemovePerlin(); } EditorGUILayout.EndHorizontal(); if (GUILayout.Button("Apply Multiple Perlin")) { terrain.MultiplePerlinTerrain(); } } }
void DrawSimple() { reorderable = EditorGUILayout.Toggle("Reorderable", reorderable); tableState = GUITableLayout.DrawTable( tableState, serializedObject.FindProperty("simpleObjects"), GUITableOption.Reorderable(reorderable)); }
void Vegetation() { showVegetation = EditorGUILayout.Foldout(showVegetation, "Vegetation"); if (showVegetation) { EditorGUILayout.LabelField("", GUI.skin.horizontalSlider); GUILayout.Label("Vegetation", EditorStyles.boldLabel); EditorGUILayout.IntSlider(maxTrees, 0, 10000, "Max Trees"); EditorGUILayout.IntSlider(treeSpacing, 2, 20, "Tree Spacing"); vegetationTable = GUITableLayout.DrawTable( vegetationTable, vegetation, GUITableOption.Reorderable(true)); EditorGUILayout.BeginHorizontal(); if (GUILayout.Button("+")) { terrain.AddNewVegetation(); } if (GUILayout.Button("-")) { terrain.RemoveVegetation(); } EditorGUILayout.EndHorizontal(); if (GUILayout.Button("Apply Vegetation")) { terrain.PlantVegetation(); } if (GUILayout.Button("Clear Vegetation")) { terrain.ClearVegetation(); } } }
void Detail() { showDetail = EditorGUILayout.Foldout(showDetail, "Detail"); if (showDetail) { EditorGUILayout.LabelField("", GUI.skin.horizontalSlider); GUILayout.Label("Detail", EditorStyles.boldLabel); EditorGUILayout.IntSlider(maxDetails, 0, 10000, new GUIContent("Max Details")); EditorGUILayout.IntSlider(detailSpacing, 1, 20, new GUIContent("Detail Spacing")); detailTable = GUITableLayout.DrawTable(detailTable, details, GUITableOption.Reorderable(true)); GUILayout.Space(20); EditorGUILayout.BeginHorizontal(); if (GUILayout.Button("+")) { terrain.AddNewDetails(); } if (GUILayout.Button("-")) { terrain.RemoveDetails(); } EditorGUILayout.EndHorizontal(); if (GUILayout.Button("Apply Details")) { terrain.PlantDetails(); } if (GUILayout.Button("Clear Details")) { terrain.ClearDetails(); } } }
void SplatMaps() { showSplatMaps = EditorGUILayout.Foldout(showSplatMaps, "Splat Maps"); if (showSplatMaps) { EditorGUILayout.LabelField("", GUI.skin.horizontalSlider); GUILayout.Label("Splat Maps", EditorStyles.boldLabel); //EditorGUILayout.Slider(splatOffset, 0f, 1f, "Offset"); //EditorGUILayout.Slider(splatNoiseXScale, 0f, 1f, "Noise Scale X"); //EditorGUILayout.Slider(splatNoiseYScale, 0f, 1f, "Noise Y Scale"); //EditorGUILayout.Slider(splatNoiseMultiplier, 0f, 1f, "Noise Multipler"); splatHeightsTable = GUITableLayout.DrawTable( splatHeightsTable, splatHeights, GUITableOption.Reorderable(true)); EditorGUILayout.BeginHorizontal(); if (GUILayout.Button("+")) { terrain.AddNewSplatHeight(); } if (GUILayout.Button("-")) { terrain.RemoveSplatHeight(); } EditorGUILayout.EndHorizontal(); if (GUILayout.Button("Apply SplatMaps")) { terrain.SplatMaps(); } } }