Exemplo 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();
    }
Exemplo n.º 2
0
 public void BuildSectionList()
 {
     forestGen.GenerateForest();
 }