24 lines
561 B
C#
24 lines
561 B
C#
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();
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|