> For the complete documentation index, see [llms.txt](https://stage-precision.gitbook.io/grid/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://stage-precision.gitbook.io/grid/unity-integration/getting-started/connect-grid-studio-and-unity.md).

# Connect Grid Studio and Unity

Set up an SPNet Sender in Grid Studio and match its network settings on the SPNet Receiver in Unity.

#### Set up the sender in Grid Studio

1. Add an **SPNet** object to the **Project Tree** and configure it as a **Sender**.
2. Set the destination address to `237.37.37.37` and the UDP port to `37373` for the default multicast connection.
3. Assign this sender to the Map Outputs, Workflow Actions or Modifier nodes used by your application.

You can reuse the same sender for multiple outputs going to the same destination. The following guides explain how to send tracking, camera, point and Generic data.

<div align="left"><figure><img src="https://1380116828-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fc4nPw8BslCHXa7bL2mf8%2Fuploads%2FHrQ37m2qtOyqzmsJ6jW1%2Fimage.png?alt=media&amp;token=0ab3007d-0e71-4982-bd2f-a99109d18f07" alt="" width="413"><figcaption></figcaption></figure></div>

#### Add the receiver in Unity

1. Choose **GameObject → SPNet → Receiver**.
2. Select the **SPNet Receiver** in the Hierarchy to open its settings in the Inspector.

{% hint style="success" %}
SPNet components automatically create a Receiver when needed. If your scene already has one, select that Receiver to configure the connection.
{% endhint %}

#### Match the network settings

For the default multicast connection, use these settings on the Unity Receiver.

| Setting                | Default                 | Purpose                                                                                            |
| ---------------------- | ----------------------- | -------------------------------------------------------------------------------------------------- |
| **Port**               | `37373`                 | Match the UDP port configured on the Grid Studio sender.                                           |
| **Multicast Group**    | `237.37.37.37`          | Match the sender's multicast destination address.                                                  |
| **Local Interface**    | **Automatic (0.0.0.0)** | Let the operating system select the local network adapter, or choose an adapter from the dropdown. |
| **Find Closest Match** | On                      | If a saved interface address is unavailable, select an available local address in the same subnet. |

**Local Interface** selects the network adapter on the Unity computer. For a computer with multiple network connections, choose the adapter connected to the Grid Studio network.

**Find Closest Match** helps when moving a project between computers on the same subnet.

Connection changes apply automatically. After editing the port or multicast address, press **Enter** or click outside the field to apply the value.

<div align="left"><figure><img src="https://1380116828-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fc4nPw8BslCHXa7bL2mf8%2Fuploads%2FFVpe0IRADa3TNTAfyosp%2Fimage.png?alt=media&amp;token=16537464-efa4-43bb-aa1c-1ea9e2542077" alt="" width="431"><figcaption></figcaption></figure></div>

#### Use unicast

On the Unity Receiver, leave **Multicast Group** empty and match the sender's UDP port. Choose the receiving **Local Interface**, or leave it on **Automatic**.

#### Receive data in the Editor

**Preview In Edit Mode** is enabled by default, so the Receiver can receive data while you work in the Editor.

Once Grid Studio sends SPNet data, **Receiving** shows **True** and the **Packets** counter increases under **Live diagnostics**.

Allow Unity network access if your operating system requests permission.
