using UnityEngine; using UnityEditor; using System.Collections; [CustomEditor(typeof(MotorPlot))] public class MotorEditor : Editor { public override void OnInspectorGUI() { base.OnInspectorGUI(); if (GUILayout.Button("Update unbound plots")) { (target as MotorPlot).DrawUnboundPlots(); } if (GUILayout.Button("Update plots")) { (target as MotorPlot).IntegratePlotsVisual(); } if (GUILayout.Button("Optimize")) { (target as MotorPlot).Optimize(); } } }