A downloadable Unity WebGL Template

Download NowName your own price

Minimal WebGL build template.

Features:

  • Scales canvas to fit the window horizontally + vertically while maintaining aspect ratio (can be disabled)
  • Centers canvas in window
  • Customizable background

To use:

  1. Download and unzip
  2. Copy the "WebGLTemplates" folder into your project's "Assets" folder
  3. File -> Build Settings... -> WebGL -> Player Settings... -> Select the "BetterMinimal" template
  4. (Optional) Customize colour in the "Background" field; enter "false" in the "Scale to fit" field to disable scaling

Ideal for embedding on sites like itch.io which provide an external full-screen button.

Published Oct 26, 2017
StatusReleased
CategoryTool
Rating
(4)
AuthorSean
Made withUnity
Tagsmeaningful-choices, Unity

Download

Download NowName your own price

Click download now to get access to the following files:

better-minimal-webgl-template-source.zip 2 kB
Version 1

Comments

Log in with itch.io to leave a comment.

(1 edit) (+1)

Works great !
Though for some reason, when enabling Itch.io's fullscreen on firefox, the game remains scaled down until you click it again. (No issue on chrome)

Another thing that is not an issue but worth noting:
Whereas Itch.io can usually find the canvas' size for Unity games automatically, this template requires setting the canvas size manually.

(1 edit) (+1)

Hey, thanks for the feedback! I'll try to take some time to look into those issues.

Edit: looks like the first issue is on Unity's end (the canvas does in fact resize, but Unity's not updating till it's been focused). RE the auto-detect size, I spent a bit of time tinkering to see if I could figure out where they're pulling the size from without success; I've submitted a feature request on itch.io's github about it though, and will update this if more info on the auto-detect becomes available.