using UnityEditor; using UnityEngine; namespace AibisDream { /// /// 齿轮系统编辑器 /// [CustomEditor(typeof(GearController))] public class GearSystemEditor : Editor { public override void OnInspectorGUI() { DrawDefaultInspector(); GearController controller = (GearController)target; GUILayout.Label("关卡编辑功能"); if (GUILayout.Button("添加一个齿轮轴")) { Debug.Log("添加齿轮轴"); } if (GUILayout.Button("添加一个浮动的齿轮")) { Debug.Log("添加浮动齿轮"); } GUILayout.Label("关卡加载/编辑"); } } }