using Assets; using UnityEditor; using UnityEngine; namespace Editor { [CustomEditor(typeof (ForestGenerator))] public class ForestGeneratorUI : UnityEditor.Editor { public override void OnInspectorGUI() { var target = this.target as ForestGenerator; DrawDefaultInspector(); if (GUILayout.Button("Generate")) { target.Generate(); } } } }