---
title: Unity Custom Loading
slug: unity-custom-loading
docTags: 
createdAt: 2024-06-27T10:39:12.763Z
---

The AirConsole Unity Plugin allows you to easily customize your Unity WebGL loading screen and loading bar.

:::BlockQuote
**Note**: Make sure your AirConsole Unity Plugin is updated to the [newest version ](https://github.com/AirConsole/airconsole-unity-plugin/tree/master)and that your Unity Editor is version 5.6 or higher.
:::

### *Loading Screen Background*

To replace the loading screen image, simply replace the png file found in <font color="#eb144c">`Assets/WebGLTemplates/AirConsole/TemplateData`</font>.

![](https://api.archbee.com/api/optimize/eODGJqzvP6Walum1Gn5N9/uLoPWMDF9vW64dB4o3Veg_image.png)

### *Loading Bar customization*

You can customize the loading bar (Only works for the WebGL build, not AndroidTV) so that it matches your background image in size, placement and colors.

Once the game is fully loaded, both the bar and background disappear, revealing the loading screen image below.

**Unity 2019 and down**

Make sure that you selected the **AirConsole&#x20;**&#x57;ebGL template:


::Image[]{src="https://api.archbee.com/api/optimize/eODGJqzvP6Walum1Gn5N9/SOrJvhoZma9nmk44tSfuI_image.png" size="60" width="300" height="111" position="center" showCaption="false"}

Go to your **index.html&#x20;**&#x74;hat can be found in<font color="#eb144c">`Assets/WebGLTemplates/AirConsole`</font>and update the<font color="#eb144c">`progress_bar_config`</font>object.

:::BlockQuote
function initAirConsole() \{
&#x20;var unity\_web\_config = \{
&#x20;  width: 16,
&#x20;  height: 9
&#x20;};
&#x20;var progress\_bar\_config = \{
&#x20;  left: "35%",
&#x20;  top: "65%",
&#x20;  width: "30%",
&#x20;  height: "5%",
&#x20;  background: "#000000",
&#x20;  color: "#ADEE00"
&#x20;};
&#x20;window\.app = new App('game', unity\_web\_config, progress\_bar\_config);
}
:::

- **left&#x20;**&#x61;nd **top**
  Determine where the top left corner of your loading bar will be placed.
- **width&#x20;**&#x61;nd **height**
  Determine how wide and tall the loading bar will be.
- **background**
  Determines the color of your “empty” loading bar. This color will gradually be hidden by the progressing bar drawn above it.
- **color**
  Determines the color of the actual progress bar. This color will gradually grow to match the loading progress.

**Unity 2020 and up**

For Unity versions 2020 and up the customization is simpler and you don't have to edit any HTML or JS files directly. Make sure that you selected the **AirConsole-2020&#x20;**&#x57;ebGL template in the **Player settings**.

Go to **Edit Project Settings > Player > Resolution and Presentation&#x20;**&#x61;nd edit the **Progress bar&#x20;**&#x66;ields.

::Image[]{src="https://api.archbee.com/api/optimize/eODGJqzvP6Walum1Gn5N9/pqeRDkOFz1LT3wC6cNwmL_image.png" size="80" width="400" height="218" position="center" showCaption="false"}

- Progress bar **background color.**
  Determines the color of your “empty” loading bar. This color will gradually be hidden by the progressing bar drawn above it.
- Progress bar **color.**
  Determines the color of the actual progress bar. This color will gradually grow to match the loading progress.
- Progress bar **height&#x20;**&#x61;nd **width.**
  Determine how wide and tall the loading bar will be.
- Progress bar offset **top&#x20;**&#x61;nd **left.**
  Determine where the top left corner of your loading bar will be placed.

The values for Progress bar **height/width&#x20;**&#x61;nd **top/left&#x20;**&#x61;re percentage based.

Make sure that you specify height/width **and&#x20;**&#x74;op/left values, otherwise it won't show the custom loading screen.

:::BlockQuote
**Note:** that upon exporting the game to WebGL, <font color="#eb144c">`index.html`</font> will be renamed to <font color="#eb144c">`screen.html`</font> by the Post Build Process.
:::

