Web GL Publish does not work for me

Hi all,
I am trying to publish my Unity Web GL build.
Uncompressed build.
Unity Editor: Menu > Publish > WebGL Project
Upload Complete; browser opens with Play button.
Play: shows [90%] “The first play through is recorded to add a preview of the game.”

Please help.
Thank you

I also experiencing this now. I don’t know how to solve this issue if you have a solution pls help us

Hi @nicca_NJ
I assume there are different situations for different people. Not sure if my recipe works for you, but you are free to try it :wink:

My issue was: my Unity project had scene with InputField on the canvas.
Everything worked when deployed in IIS on my localhost.
Publishing WebGL would either fail completely or disable InputField, with multiple errors logged in the browser.

All I could achieve was publishing WebGL build on my server in Azure. If it helps, here is what I did to make it work:

  • C# (my code: KeyboardClass.cs)

     void Start()

    // disable WebGLInput.captureAllKeyboardInput so elements in web page can handle keabord inputs
    WebGLInput.captureAllKeyboardInput = false;

  • Build config:

Project Settings > Player > Settings for WebGL > Publishing Settings

Explicitly Thrown Exceptions Only

Throw Gzip Data Caching [v]

Decompression Fallback [v]

=Build/Index.html add:

var recaptureInputAndFocus = function() {
      //var canvas = document.getElementById("#canvas");
      if(canvas) {
        canvas.setAttribute("tabindex", "1");
      } else
        setTimeout(recaptureInputAndFocus, 100);
  • Deployed to Azure (added to my existing webapp)

  • Web.config add:

     <remove fileExtension=".unityweb" />

As the result: my project works fine in browsers on PC. But it fails to load on mobile devices :frowning:
Previous version, 90 MB, worked fine both on PC and mobile. New version, 170 MB - fails to load on mobiles. Works on PC only.