public override void OnInspectorGUI() { serializedObject.Update(); EditorGUILayout.PropertyField(flyThrough, new GUIContent("Fly Through Controller"), true); EditorGUI.BeginChangeCheck(); if (GUILayout.Button("Open in Editor")) { FlyThroughEditor flyThroughEditor = (FlyThroughEditor)EditorWindow.GetWindow(typeof(FlyThroughEditor)); flyThroughEditor.titleContent = new GUIContent("Fly Through"); } EditorGUILayout.PropertyField(baseNodes, new GUIContent("Nodes"), true); EditorGUILayout.PropertyField(startEnd, new GUIContent("Start-End Nodes"), true); EditorGUILayout.PropertyField(paths, new GUIContent("Paths"), true); serializedObject.ApplyModifiedProperties(); if (GUI.changed) { EditorUtility.SetDirty(nodeList); } }
static void Init() { FlyThroughEditor window = GetWindow <FlyThroughEditor>(); window.titleContent = new GUIContent("Fly Through"); }