public override void OnInspectorGUI() { serializedObject.Update(); //base.OnInspectorGUI(); EditorGUILayout.PropertyField(contextProp); UAIGraphData graphData = (UAIGraphData)target; GUI.enabled = graphData.context != null; if (GUILayout.Button("Load Graph Editor")) { UtilityGraphWindow.OpenEditorWindow(graphData); } GUI.enabled = true; serializedObject.ApplyModifiedProperties(); /*if (DrawDefaultInspector()) * { * }*/ }
public UtilityGraphView(UAIGraphData graphData) { this.graphData = graphData; this.graphDataSerialized = new SerializedObject(graphData); styleSheets.Add(Resources.Load <StyleSheet>("UAIGraphStylesheet")); SetupZoom(ContentZoomer.DefaultMinScale, ContentZoomer.DefaultMaxScale); this.AddManipulator(new ContentDragger()); this.AddManipulator(new SelectionDragger()); this.AddManipulator(new RectangleSelector()); /*MiniMap miniMap = new MiniMap(); * contentContainer.Add(miniMap);*/ var grid = new GridBackground(); grid.StretchToParentSize(); Insert(0, grid); GenerateNodes(); graphViewChanged = OnGraphViewChanged; RegisterCallback <KeyDownEvent>(OnTabEvent); }