# Exporting for Web

To export your experience as a Web app, follow the procedure corresponding to your version of Unity.

{% tabs %}
{% tab title="Unity 6" %}

### Settings for Unity 6

{% embed url="<https://youtu.be/pvr2OW9HqvU>" %}

* From the Unity editor's menu bar, go to Zoe > Build Target Window.

<figure><img src="https://2377590261-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fz0pDcUm114qZSWNhbhEt%2Fuploads%2FRIXX7pp1vOia3mNjxX6s%2Fbuild-target.webp?alt=media&#x26;token=d5bd3770-c12e-45f8-8fb9-d9756096a016" alt=""><figcaption></figcaption></figure>

* Click on `Switch build target to Web`. Wait a moment for the process to complete.
* Make sure that `Enable Desktop Camera Control` is checked in the inspector of your interactive camera(s) (Interaction Rig).

### What was modified?

When switching the build target to Web, Zoe for Unity automatically modifies several project settings in the background. If you want to double check or are curious, here are the settings that are modified:

{% hint style="info" %}
The steps described below are not needed and should be automatically set up when switching the build profile to Web.
{% endhint %}

* Open File > Build Profiles.
* From the Build Profiles window, click on `Player Settings`.

<figure><img src="https://2377590261-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fz0pDcUm114qZSWNhbhEt%2Fuploads%2FoPmmsm9OvtZigKYHHqCy%2Fexport-web-0-0.webp?alt=media&#x26;token=09fa318b-ba11-4131-88f7-6b53450d2241" alt=""><figcaption></figcaption></figure>

* Select `Player` from the sidebar.&#x20;
* From the Web tab (symbolized by a world globe), expand `Publishing Settings`.
  * `Compression Format` is set to **Gzip**.
  * `Data Caching` is unchecked.

<figure><img src="https://2377590261-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fz0pDcUm114qZSWNhbhEt%2Fuploads%2F16CLVJON3PwPLXVl0H7k%2Fexport-web-1-1.webp?alt=media&#x26;token=e99aeafa-2ad1-4770-bd6c-e8e3590c88f7" alt=""><figcaption></figcaption></figure>

* Select `XR Plug-in Management` from the sidebar, then the Web tab (symbolized by a world globe).
  * `Initialize XR on Startup` is unchecked.

<figure><img src="https://2377590261-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fz0pDcUm114qZSWNhbhEt%2Fuploads%2FoFnqtpbpcihLUh9iUwzF%2Fexport-web-2-2.webp?alt=media&#x26;token=a211348c-d46a-42a7-af3e-bcaf6de37702" alt=""><figcaption></figcaption></figure>
{% endtab %}

{% tab title="Unity 2023 and prior" %}

### Settings for Unity 2023 and prior

{% embed url="<https://youtu.be/LrHKFcdbxKQ?si=ek6-fqAYVTnKo3y7>" %}

* Make sure that `Enable Desktop Camera` is checked in the inspector of your interactive camera(s) (Interaction Rig).
* Go to File > Build Settings.
* Select `WebGL` in the sidebar.
* If you see an `Install with Unity Hub` button, click on it. Unity will then install the necessary WebGL modules. You may need to close and reopen Unity after the process.
* With WebGL selected, click on `Switch Platform` at the bottom of the Build Settings window.&#x20;

{% hint style="info" %}
If you don't see a `Switch Platform` button that means your project is already set up with the correct platform.
{% endhint %}
{% endtab %}
{% endtabs %}

### Exporting for Web

{% hint style="info" %}
This process covers all versions of Unity.
{% endhint %}

* In File > Build Profiles (or Build Settings), make sure all necessary scene(s) of your experience are selected in the Scene List.
* Hit `Build`.
* Name your build, select a folder for it to be exported to, then click `Save`.

It will take a few minutes for your build to export. Once done, your exported files will automatically open in a new window.

### Playing your Experience

Once you've exported a build for web, it's time to play it.

* Select your build and compress it as a .zip file (Windows: right-click on folder, Compress to... > ZIP File / macOS: right-click on folder, Compress "\[Build name]").

{% hint style="info" %}
Make sure to compress the root folder of your build and not a subfolder. The root folder is the one you named when exporting, and it always contains an `index.html` file.
{% endhint %}

* Go to [play.unity.com](https://play.unity.com/en).
* Log into your Unity account, then click on the Upload icon on the right side of the menu bar.
* Select your build's ZIP file or simply drag and drop it into the Upload section.
* Fill in the Title and Description fields, then hit `Save`.

{% hint style="info" %}
If your build's visibility is set to `Public`, you'll be able to share it with anyone via an url address.
{% endhint %}

* Hit the `Play` button to launch your experience!
