public override void OnInspectorGUI() { if (GUILayout.Button("Open Editor")) { InstructionGraphWindow.ShowWindowForGraph(_graph); } DrawDefaultInspector(); DrawNodes(_nodesProperty); }
public override void OnInspectorGUI() { if (GUILayout.Button("Open Editor")) { InstructionGraphWindow.ShowWindowForGraph(_graph); } using (new UndoScope(serializedObject)) { DrawPropertiesExcluding(serializedObject, "m_Script", "_nodes"); DrawNodes(_nodesProperty); } }
private void AddNode(SerializedProperty nodes) { var window = InstructionGraphWindow.FindWindowForGraph(_graph); var position = _graph.StartPosition + new Vector2(InstructionGraphNode.NodeData.Width + 20.0f, _addOffset); _addOffset += 40.0f; var node = CreateNode(_graph, typeof(MockupNode), "Mockup", position); if (window != null) { window.AddNode(node); } }