# Build Project

For building game and test it before publishing it on a game store, you can follow these steps:

1. In Unity editor, select File -> Build Settings.\ <br>

   <figure><img src="/files/C9HxONGVPlOMGY5la9bA" alt="" width="563"><figcaption><p><em>Build Settings Window.</em></p></figcaption></figure>

2. On Build Settings Window, select platform you like -> select switch platform.

3. Wait for the platform switch to finish.

4. Choose "Build" to compile your game, or "Build and Run" to test it with your device.

For more details about building game on platforms, refer to the following platform guides:

{% tabs %}
{% tab title="Android" %}
[Guide](https://docs.unity3d.com/2022.3/Documentation/Manual/android-BuildProcess.html) for building game on Android platform.
{% endtab %}

{% tab title="iOS" %}
[Guide](https://docs.unity3d.com/2022.3/Documentation/Manual/iphone-BuildProcess.html) for building game on iOS platform.
{% endtab %}

{% tab title="Windows" %}
[Guide](https://docs.unity3d.com/2022.3/Documentation/Manual/WindowsStandaloneBinaries.html) for building game on Windows platform.
{% endtab %}

{% tab title="WebGL" %}
[Guide](https://docs.unity3d.com/2022.3/Documentation/Manual/webgl-building.html) for building game on WebGL platform.
{% endtab %}
{% endtabs %}

#### <mark style="color:yellow;">**Note about build your racing game on Windows platform or WebGL platform**</mark>

{% hint style="info" %}
I also have this game template is prepared for Windows and WebGL platform. Just contact me through my mail, send me your invoice from buying my game template on Unity Asset Store, and I will send you the game template soon as I can :thumbsup:. Please check [contact page](/2d-racing-multiplayer-game-template/other-informations/contact.md) for knowing my mail. Thank you.
{% endhint %}

This template package focuses primarily on the mobile platform, so you need to perform a few steps before building the game on Windows or WebGL platform:

1. Remove Admob and Unity IAP package because these packages won't work on Windows and WebGL platform.

2. After finishing remove Admob and Unity IAP, Unity console will show errors log from when some script is calling api from these two packages -> open scripts are shown on console window -> remove or comment lines code are showing error.&#x20;

3. Open Main Menu scene -> Select "ButtonShop\_IAP" and "ButtonGetFreeCoins" game object -> disable these two buttons.\ <br>

   <figure><img src="/files/JNxWSaredzUUTIZdJ30D" alt="" width="563"><figcaption></figcaption></figure>

4. Open Gameplay Classic Scene -> expand "CanvasGameplay" game object -> select "InputMobile" game object -> disable it.\ <br>

   <figure><img src="/files/DAgLBNELWT2EImqLTXjA" alt="" width="563"><figcaption></figcaption></figure>

5. Open Gameplay Multiplayer scene -> expand "CanvasGameplay" game object -> select "InputMobile" game object -> disable it.\ <br>

   <figure><img src="/files/nzoYNyH1kFSea3IjpLWA" alt="" width="563"><figcaption></figcaption></figure>

6. ( For building on WebGL platform ) Select Tools -> Fusion -> Network Project Config -> Enable allow client server mode in WebGL.\ <br>

   <figure><img src="/files/kXNmiRQQFHKEGUILrkLh" alt="" width="458"><figcaption></figcaption></figure>

7. All done, you can build your game now :thumbsup:.


---

# 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://black-knight.gitbook.io/2d-racing-multiplayer-game-template/getting-started/build-project.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.
