# GetConnectedPorts(List<IPort>)

> Retrieves all ports connected to this port.

## Definition

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

```csharp
void GetConnectedPorts(List<IPort> outConnectedPorts)
```

### Parameters

**** (\[List\<IPort>]\(https\://learn.microsoft.com/dotnet/api/system.collections.generic.list-1)): A list to populate with the connected ports.

### Remarks

This method adds all connected ports to the provided list. It clears the list before adding items.
