# GetNode(IPort)

> Retrieves the INode that owns the specified port.

## Definition

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

```csharp
public static INode GetNode(this IPort port)
```

### Parameters

**** (\[IPort]\(/engine/6000.6/script-reference/unity/graphtoolkit/editor/iport)): The port to get the owning node from.

### 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) that contains the specified port. |

### Remarks

This is helpful when analyzing graph structures, especially when traversing connections. The returned node provides context for the port’s role in the graph.

### Examples

```csharp
IPort port = somePortReference;
INode node = port.GetNode();

Debug.Log($"Port '{port.name}' belongs to node: {node}.");
```
