> For the complete documentation index, see [llms.txt](https://docs.coherence.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.coherence.io/2.3/getting-started/setup-a-project/scene-setup.md).

# 1. Scene setup

{% hint style="info" %}
If you prefer a video tutorial, refer to the first minute of [Part 2](https://youtu.be/kyUSiBpZ2Bc) of our Getting Started series.
{% endhint %}

One of the first steps in adding coherence to a project is to setup the scene that you want the networking to happen in.

### **Add a CoherenceBridge**

In the top menu: *GameObject > coherence > Bridge*

A GameObject with a `CoherenceBridge` component will be created in the scene, that we will refer to as CoherenceBridge or *the bridge*.

CoherenceBridge manages the connection with coherence's relay (i.e., the [Replication Server](/2.3/manual/replication-server.md)) and is the centre of many connection-related events.

No particular setup is required now, but feel free to explore the options in its Inspector.

### **Add a CoherenceLiveQuery**

In the top menu: GameObject *> coherence > Live Query*

A GameObject with a `CoherenceLiveQuery` component will be created in the scene, that we will refer to as CoherenceLiveQuery or *the live query*.

A [CoherenceLiveQuery](/2.3/manual/components/coherence-live-query.md) defines what part of the world the Client is interested in when requesting data from the Replication Server. When **Constrained**, it covers limited volume. The **Extent** property specifies how far it reaches. Anything that is **outside** the area defined by the LiveQuery **will not be synced**.

For a big game world, it makes sense to use a small range and parent the LiveQuery to the player character or the camera, so it can move with it. But for now, let's just position it at the centre of the world (unparented), and keep it as **Infinite** (no spatial constraints).

<figure><img src="/files/XV7gFp7pRrT9EnpCcCjy" alt=""><figcaption></figcaption></figure>

{% hint style="warning" %}
While LiveQueries are an optimisation tool, having at least one LiveQuery is **necessary**.
{% endhint %}

### **Add** a Connect Dialog

We'll be using coherence's Sample UI since it has everything we need to get kickstarted.

In the top menu: *coherence > Hub*

Within the Hub, go to the Samples tab. Within UIs you will find the Rooms Sample UI

<figure><img src="/files/tqJvBE1ODm6EmYplffbr" alt=""><figcaption></figcaption></figure>

The imported sample has a demo scene, but what matters to us now is the `Room Connection Dialog.prefab`, which we can drop on our scene.

{% hint style="info" %}
This sample uses Unity GUI (UGUI). For input events to be forwarded properly, you'll need at least an EventSystem (GameObject > UI > Event System)
{% endhint %}

A Connect dialog UI provides an interface for the player to connect to the Replication Server, once the game is running. You can create your own connection dialog, but we provide a few examples as a quick way to get started and for prototyping. Read more in the section dedicated to [Sample UIs](/2.3/getting-started/samples-and-tutorials/samples-connection-uis.md).

This is how your scene should look like

<figure><img src="/files/vANPvjhKsu9CsUn9Bz4C" alt=""><figcaption></figcaption></figure>

***

{% hint style="success" %}
**In this section, we:**

* Added a [CoherenceBridge](/2.3/manual/components/coherence-bridge.md) to the scene to facilitate connection to the [Replication Server](/2.3/manual/replication-server.md)
* Used a [CoherenceLiveQuery](/2.3/manual/components/coherence-live-query.md) to ensure we receive network updates
* Added an in-game UI to allow players to connect over the network

Next: time to [setup some Prefabs](/2.3/getting-started/setup-a-project/prefab-setup.md)!
{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.coherence.io/2.3/getting-started/setup-a-project/scene-setup.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
