The CreateNewNode
method is responsible for creating a new node within the graph view. This method takes in a node type and a position, and returns a NodeUI
object representing the newly created node.
The CreateNewNode
method is responsible for creating a new node within the graph view. This method takes in a node type and a position, and returns a NodeUI
object representing the newly created node.
To use the CreateNewNode
method, you need to provide the type of node you want to create and the position where the node should be placed within the graph view. The method will return a NodeUI
object that you can use to further manipulate the node if needed.
// Example of creating a new node in a graph view // Assume 'graphView' is an instance of GraphView Editor.NodeEditor.INodeType nodeType = ...; // Define or obtain the node type Vector2 position = new Vector2(100, 200); // Define the position for the new node Editor.NodeEditor.NodeUI newNode = graphView.CreateNewNode(nodeType, position); // Now 'newNode' can be used to interact with the newly created node