# GetNode(int)

> Retrieves a node defined in the graph by its index.

## Definition

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

```csharp
public INode GetNode(int index)
```

### Parameters

**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): The zero-based index of the node to retrieve.

### Returns

| Type                                                                        | Description                                                                                             |
| --------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- |
| [INode](/engine/6000.6/script-reference/unity/graphtoolkit/editor/inode.md) | The [INode](/engine/6000.6/script-reference/unity/graphtoolkit/editor/inode.md) at the specified index. |

### Remarks

Use this method to access a node based on its creation order in the graph. The index is zero-based and must be within range (see: [Graph.NodeCount](/engine/6000.6/script-reference/unity/graphtoolkit/editor/graph/nodecount.md)).

The list includes:

* Your own [Node](/engine/6000.6/script-reference/unity/graphtoolkit/editor/node.md)s

* [ContextNode](/engine/6000.6/script-reference/unity/graphtoolkit/editor/contextnode.md)s

* [IVariableNode](/engine/6000.6/script-reference/unity/graphtoolkit/editor/ivariablenode.md)s

* [IConstantNode](/engine/6000.6/script-reference/unity/graphtoolkit/editor/iconstantnode.md)s

* [ISubgraphNode](/engine/6000.6/script-reference/unity/graphtoolkit/editor/isubgraphnode.md)s

It excludes [BlockNode](/engine/6000.6/script-reference/unity/graphtoolkit/editor/blocknode.md)s, which are only accessible through their parent [ContextNode](/engine/6000.6/script-reference/unity/graphtoolkit/editor/contextnode.md).
