using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEditor; using ChivaVR.State; [CustomEditor(typeof(ProcedureStateGraphController))] public class ProcedureStateGraphControllerEditor : Editor { private ProcedureStateGraphController procedureStateGraph; public SerializedObject pObj; private SerializedProperty pstateGraphBases; private void OnEnable() { procedureStateGraph = (ProcedureStateGraphController)target; this.pObj = new SerializedObject(target); pstateGraphBases = this.pObj.FindProperty("stateGraphBases"); } public override void OnInspectorGUI() { this.pObj.Update(); //流程图表 EditorGUILayout.PropertyField(this.pstateGraphBases, new GUIContent("流程图:"), true); procedureStateGraph.linerRunning = EditorGUILayout.Toggle("是否使用ProcedureManager线性流程", procedureStateGraph.linerRunning); procedureStateGraph.orderRunGraph = EditorGUILayout.Toggle("依次执行Graph", procedureStateGraph.orderRunGraph); if (GUILayout.Button("创建流程图")) { StateGraph.CreateStateGraph(); } this.pObj.ApplyModifiedProperties(); } }