22 lines
509 B
C#
22 lines
509 B
C#
using UnityEditor;
|
|
using UnityEngine;
|
|
|
|
namespace AibisDream.SystemEditor
|
|
{
|
|
[CustomEditor(typeof(GearSystem))]
|
|
public class GearSystemEditor : SystemHasDataEditor
|
|
{
|
|
public override void OnInspectorGUI()
|
|
{
|
|
var example = (GearSystem)target;
|
|
|
|
base.OnInspectorGUI();
|
|
GUILayout.Label("修改");
|
|
|
|
if (GUILayout.Button("添加一个齿轮轴"))
|
|
{
|
|
example.AddShaft();
|
|
}
|
|
}
|
|
}
|
|
} |