# Connection

## 🔗 Connection Class

A connection between two nodes.

> Namespace: `Esper.SkillWeb.Graph`\
> Inherits from: `GraphElement`\
> Type: `class`

***

### 📦 Fields

| Access   | Field             | Type  | Description                         |
| -------- | ----------------- | ----- | ----------------------------------- |
| `public` | `outputNodeID`    | `int` | The output node ID.                 |
| `public` | `inputNodeID`     | `int` | The input node ID.                  |
| `public` | `outputPortIndex` | `int` | The output port index.              |
| `public` | `inputPortIndex`  | `int` | The input port index.               |
| `public` | `styleIndex`      | `int` | The index of the connection prefab. |

***

### 🧰 Methods

| Access   | Method                                | Returns      | Description                                     |
| -------- | ------------------------------------- | ------------ | ----------------------------------------------- |
| `public` | `Connection(int, int, int, int, int)` | -            | Constructor.                                    |
| `public` | `Matches(int, int, int, int)`         | `bool`       | If the data matches this node's conection data. |
| `public` | `Matches(Connection)`                 | `bool`       | If another connection matches this connection.  |
| `public` | `CreateCopy()`                        | `Connection` | Creates a copy of this connection.              |
