# 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 Unity Editor.&#x20;

{% hint style="info" %}
Make sure you have run through [Build and run](/0.5.2/get-started/build-and-run.md) and [Create an account](/0.5.2/get-started/create-an-account.md).
{% endhint %}

On Unity's menu bar, navigate to `coherence -> Simulator -> Build Wizard`.

![](/files/qrK9KgF1crJwoYtJZALc)

From within the **Build Wizard** you can build and upload simulators.&#x20;

The **Info** tab provides information and requirements to build simulators properly.

![](/files/-MYxzcGXTovgOKtFqlks)

The **Build** tab creates valid simulator builds from **Build Configuration Assets.**&#x20;

![](/files/-MYy3QI0NmcCR3LitFrP)

{% hint style="warning" %}
There's a known issue in the Platforms package provided by Unity where builds will fail when the project is not in the target build platform. To prevent this from happening, please **switch your active platform to match the one used in your build configuration** before building.&#x20;
{% endhint %}

#### Creating a Build Configuration Asset

You can create them via `Assets -> Create -> coherence -> Simulator Build Configuration`.

A newly created build configuration looks like this:

![](/files/-MYy1zyIfuQYUBm-g18n)

There are several settings you might want to change.

* Specify the scenes you want to get in the build via the **Scene List** component.
* Specify a *Company Name* and a *Version* from the **General Settings** component (optional).
* Additionally, you can add our OptimizeForSize component (find it using **Add Component**). Specify which optimizations you want to use to reduce the final build size from the **Optimize For Size** component (optional).&#x20;

#### Reducing simulator build size (experimental ⚠️)

{% hint style="warning" %}
**This feature is experimental, please make sure you backup your project beforehand.**
{% endhint %}

You can add an **OptimizeForSize** component to your build configuration via the Add Component in the build configuration inspector. It looks like this:

![Optimize For Size component, part of a Build Configuration Asset.](/files/-MYy3wP9XeufmwJpKIa_)

Select the desired optimizations depending on your needs.

| Optimization                             | What it does                                                                                                                                                                                                                                                        |
| ---------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Replace Textures And Sounds With Dummies | 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.                             |
| Keep Original Assets Backup              | The Assets Backup (found at`<project>/Library/coherence/AssetsBackup`) is kept after the build process is completed, instead of deleted. This will take disk space depending on the size of the project, but it's 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" %}
Settings applied to built simulators will be reverted once the build process is completed, so these settings won't affect other builds you make.
{% endhint %}

## Upload your simulator&#x20;

Once you have created a valid simulator build, you can upload it to coherence.

If you built your simulator using the Build tab, you should have a valid path to your simulator build set already. If you haven't or want to use a different path, use the **Browse** button.

![](/files/-MYyFAkBWoQysTe9mMut)

You'll see in the developer dashboard when your simulator is ready and running.&#x20;

![](/files/-MeQ7cNpXcOLOHLEOiOJ)

{% hint style="warning" %}
Target frame rate on simulator builds is forced at 30.
{% endhint %}


---

# Agent Instructions: 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/0.5.2/simulators/build-deploy-simulators.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.
