# PortDirection

> Specifies the direction of a port in the graph.

## Definition

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

```csharp
[Flags]
public enum PortDirection
```

## Remarks

Use [PortDirection](/engine/6000.5/script-reference/unity/graphtoolkit/editor/portdirection.md) to indicate whether a port receives or sends information. This enum supports bitwise operations which allows for combinations of values, although most ports are either [PortDirection.Input](/engine/6000.5/script-reference/unity/graphtoolkit/editor/portdirection/input.md) or [PortDirection.Output](/engine/6000.5/script-reference/unity/graphtoolkit/editor/portdirection/output.md). The direction affects how the port is used in the graph. [PortDirection.Input](/engine/6000.5/script-reference/unity/graphtoolkit/editor/portdirection/input.md) ports receive connections and typically appear on the left side of a node. [PortDirection.Output](/engine/6000.5/script-reference/unity/graphtoolkit/editor/portdirection/output.md) ports initiate connections and typically appear on the right side of a node. Use [PortDirection.None](/engine/6000.5/script-reference/unity/graphtoolkit/editor/portdirection/none.md) when a port has no fixed direction.

## Fields

| Value                                                                                       | Description                                                                   |
| ------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------- |
| [Input](/engine/6000.5/script-reference/unity/graphtoolkit/editor/portdirection/input.md)   | The port receives information. It accepts connections from output ports.      |
| [None](/engine/6000.5/script-reference/unity/graphtoolkit/editor/portdirection/none.md)     | The port does not have a fixed direction. It may receive or send information. |
| [Output](/engine/6000.5/script-reference/unity/graphtoolkit/editor/portdirection/output.md) | The port sends information. It creates connections to input ports.            |
