# Build and Deploy

### Build a Simulator to be uploaded to the cloud

A **Simulator build** is a built Unity Player for the Linux 64-bit platform that you can upload to **coherence** straight from the Unity Editor.

Open the c*oherence Hub* and select the *Simulators* tab. From there you can build and upload Simulators.

### Configuring your Simulator build

You can change your Simulator build options by editing the *SimulatorBuildOptions* object, or in the *coherence Hub Simulators* ta&#x62;*.*

<figure><img src="https://content.gitbook.com/content/CMCtKgV0bk1lwR4tWK3W/blobs/r3x6gl7Z6yuyIqLXf1eC/coherence%20Hub%20Simulator%20Build%20Options.png" alt=""><figcaption><p>coherence Hub Simulator Build Options</p></figcaption></figure>

There are several settings you might want to change.

* Specify the scenes you want to get in the build via the *Scenes To Build* field.
* For a local build, you can choose to enable/disable the *Headless Mode* by ticking the checkbox. For a cloud build, Headless Mode is always enabled by default.
* Choose your preferred *Scripting Implementation* from the drop-down list. It can either be [Mono 2x](https://docs.unity3d.com/Manual/Mono.html) or [IL2CPP](https://docs.unity3d.com/Manual/IL2CPP.html).
* For more information about the options listed under *Build Size Optimizations*, see [this section below](#reducing-simulator-build-size-experimental).

### Create and upload the build

{% hint style="info" %}
Make sure you have completed the steps required in [Create an account](https://docs.coherence.io/getting-started/setup-a-project/test-in-the-cloud).
{% endhint %}

{% hint style="warning" %}
**Make sure you meet the requirements:**

1. You have to have Linux modules (`Linux Build Support (IL2CPP)`, `Linux Build Support (Mono)`, and `Linux Dedicated Server Build Support`) installed in Unity Editor. See [Adding modules through the Unity Hub](https://docs.unity3d.com/hub/manual/AddModules.html).
2. You have to be logged into **coherence** **Cloud** via the coherence Hub window. See [Login through Unity](https://docs.coherence.io/getting-started/setup-a-project/test-in-the-cloud#login-through-unity) for more information.
   {% endhint %}

Press the *coherence Hub > Simulators > Build And Upload Simulator* butto&#x6E;*.*

<figure><img src="https://content.gitbook.com/content/CMCtKgV0bk1lwR4tWK3W/blobs/F7dCJ7wsvtMajCwPD5hH/image.png" alt=""><figcaption></figcaption></figure>

When the build is finished, it will be uploaded to your currently selected organization and project in the Developer Portal.

## Connecting your Simulator to a Room or World

You can see your uploaded simulator builds on the Dashboard on the Schemas & Builds sections of your project.

{% hint style="warning" %}
Target frame rate on Simulator builds is forced at 30. This can be changed through the Runtime Settings asset in your Unity project. There's a setting to disable this behaviour, or to change from 30 to a different target frame rate.
{% endhint %}

#### Reducing Simulator build size — EXPERIMENTAL ⚠️

<figure><img src="https://content.gitbook.com/content/CMCtKgV0bk1lwR4tWK3W/blobs/M8HdjHGImkF84anIILMF/image.png" alt=""><figcaption></figcaption></figure>

Select the desired optimizations depending on your needs.

| Optimization            | What it does                                                                                                                                                                                                                                                        |
| ----------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Strip Assets            | Project's textures and sound files are replaced with tiny and lightweight alternatives (dummies). Original assets are copied over to *\<project>/Library/coherence/AssetsBackup*. They are restored once the build process has finished.                            |
| Backup Assets           | The *Assets Backup* (found at *\<project>/Library/coherence/AssetsBackup*) is kept after the build process is completed, instead of deleted. This will take extra disk space depending on the size of the project, but is a safety convenience.                     |
| Compress Meshes         | Sets Mesh Compression on all your models to High.                                                                                                                                                                                                                   |
| Disable Static Batching | Static Batching tries to combine meshes at compile-time, potentially increasing build size. Depending on your project, static batching can affect build size drastically. Read more about [static batching](https://docs.unity3d.com/Manual/DrawCallBatching.html). |

{% hint style="info" %}
Once your Simulator is built and uploaded, you'll be prompted with the option to revert the settings to the ones you had applied before building. This is to avoid these settings from affecting other builds you make.
{% endhint %}
