How to get rid of WebGL preloader in Unity 5.6

Hello,

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"), e.logo.style.cssText = a + "background: url('" + n + "') no-repeat center / contain; width: 154px; height: 130px;", e.container.appendChild(e.logo)), e.progress || (e.progress = document.createElement("div"), e.progress.style.cssText = a + " height: 18px; width: 141px; margin-top: 90px;", e.progress.empty = document.createElement("div"), e.progress.empty.style.cssText = "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"), e.progress.full.style.cssText = "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)), e.progress.full.style.width = 100 * t + "%", e.progress.empty.style.width = 100 * (1 - t) + "%", 1 == t && (e.logo.style.display = e.progress.style.display = "none")

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