How to get rid of WebGL preloader in Unity 5.6


Looks like in Unity 5.6, WebGL template system has been changed and the documentation (Unity - Manual: WebGL templates) is outdated.

For example, both new Minimal and Default templates don’t have neither “%UNITY_WEBGL_LOADER_GLUE%”, nor “canvas” element.

I want to implement a preloader without progress bar (constant animation) and remove it when the Unity content is loaded. My application runs with 100% width and 100% height of user screen.

So how can I get rid of the black rectangle with standard preloader and just receive an event when it’s time to hide my custom HTML5 preloader?

@bkachmar Did you ever figure this out? I want to run at fullscreen too, as we were able to do before 5.6.

I was able to remove the initial logo and loading bar on 5.6
I tried a lot of things with the UnityProgress.js, but what really did the job was commenting out one line from UnityLoader.js:

e.logo || (e.logo = document.createElement("div"), = a + "background: url('" + n + "') no-repeat center / contain; width: 154px; height: 130px;", e.container.appendChild(e.logo)), e.progress || (e.progress = document.createElement("div"), = a + " height: 18px; width: 141px; margin-top: 90px;", e.progress.empty = document.createElement("div"), = "background: url('" + o + "') no-repeat right / cover; float: right; width: 100%; height: 100%; display: inline-block;", e.progress.appendChild(e.progress.empty), e.progress.full = document.createElement("div"), = "background: url('" + i + "') no-repeat left / cover; float: left; width: 0%; height: 100%; display: inline-block;", e.progress.appendChild(e.progress.full), e.container.appendChild(e.progress)), = 100 * t + "%", = 100 * (1 - t) + "%", 1 == t && ( = = "none")

This is line 702 of the beautified UnityLoader.js. With this, the loader will not appear.