Esempio n. 1
0
    public override void OnInspectorGUI()
    {
        serializedObject.Update();

        ForestGenerator gen = (ForestGenerator)target;

        EditorGUILayout.PropertyField(treePrefab_Prop, new GUIContent("Tree Billboard Prefab"));
        EditorGUILayout.PropertyField(sprites_Prop, new GUIContent("Tree Materials"));
        EditorGUILayout.PropertyField(rowSpacing_Prop, new GUIContent("Row Spacing"));
        EditorGUILayout.PropertyField(rows_Prop, new GUIContent("Rows"));

        if (GUILayout.Button("Generate"))
        {
            gen.GenerateForest();
        }

        serializedObject.ApplyModifiedProperties();
    }
Esempio n. 2
0
 public void BuildSectionList()
 {
     forestGen.GenerateForest();
 }