using System.Collections; using System.Collections.Generic; using UnityEditor; using UnityEngine; [CustomEditor(typeof(GrowMultipleTrees))] public class MultipleTreesEditor : Editor { public override void OnInspectorGUI() { DrawDefaultInspector(); GrowMultipleTrees myScript = (GrowMultipleTrees)target; if(GUILayout.Button("Step")) { myScript.step(); } } }