# AddNode(Node)

> Adds a node to the Graph.

## Definition

* **Type:** Method
* **Namespace:** [Unity.GraphToolkit.Editor](/engine/6000.7/script-reference/unity/graphtoolkit/editor.md)
* **Assembly:** UnityEditor

```csharp
public void AddNode(Node node)
```

### Parameters

**** (\[Node]\(/engine/6000.7/script-reference/unity/graphtoolkit/editor/node)): The node to add.

### Remarks

If the node is already in this graph, this method does nothing. If the node is currently in another graph, it will be removed from that graph and added to this one. Enclose this method with [Graph.UndoBeginRecordGraph](/engine/6000.7/script-reference/unity/graphtoolkit/editor/graph/undobeginrecordgraph.md) and [Graph.UndoEndRecordGraph](/engine/6000.7/script-reference/unity/graphtoolkit/editor/graph/undoendrecordgraph.md) to add this operation to the undo stack and to update the graph view with the changes.
