Simple yet sleek WebGL template for unity.
- Download the latest
.zip
file for this template from the link above - Extract the contents using any zip program of your choice
- Drag and drop or copy the extracted folder
RacerMinimal
to your unity project's Assets folder:Assets/RacerMinimal
..or simply clone this repo, copy and paste RacerMinimal
folder to your unity project's Assets folder: Assets/RacerMinimal
If imported successfully, you should see something similar as in the image above, by navigating to file > build setting > player setting > resolution and presentation
Preview:
Optimize for pixel art:
Handy if you're targeting pixel art style- set:either true or false
Hide footer:
Whether or not to hide the buttons below the container- set:either true or false
Border colour:
Changes the border colour of the container and footer(if not hidden). You can specifytransparent
as a value if you don't need the borders displayed at all otherwise- set: hex-colours such as:(#xyz, #abc, etc)
, hardcoded colours such as:(red, blue, etc)
, ortransparent
To change background colour navigate to:
Player Settings > Splash Image > Background > Background Color
. Any colour you set there would be applied to this tool, you can observe it during the initial load of your game:
In case you're hosting your unity WebGL game on itch.io, usually unity defaults a resolution of
960 X 600
, this tends to clip off this template's contents caused by the size of the container which itch website uses to render WebGL games..
Here's my hacky way of achieving a fitting dimension:
- Inside unity, set the default Width and Height to
860 X 500
as seen above. - On itch website, while editing your game, set the Width and Height values to
960 X 600
:
- See Unity docs on how to customize WebGL Templates.
- Inspired by BetterMinimal