Description
The Graph
property of the GraphView
class provides access to the underlying graph data structure that the node editor operates on. This property is of type Editor.NodeEditor.IGraph
, which represents the interface for graph data structures used within the node editor framework.
Usage
Use the Graph
property to access or modify the graph associated with a GraphView
instance. This can be useful for operations such as adding or removing nodes, connecting nodes, or querying the graph structure.
Example
// Example of accessing the Graph property
var graphView = new Editor.NodeEditor.GraphView();
Editor.NodeEditor.IGraph graph = graphView.Graph;
// Perform operations on the graph
// For example, adding a node
var newNode = new Editor.NodeEditor.Node();
graph.AddNode(newNode);