Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice

WebGL doesn't work (in last beta too) despite added new feature to it

Discussion in '2020.2 Beta' started by mailfromthewilds, Apr 19, 2020.

  1. mailfromthewilds

    mailfromthewilds

    Joined:
    Jan 31, 2020
    Posts:
    217
    Its nice that now you can compile either for "speed" or "size" whatever these options mean. Its that build speed or game performance?

    On last beta and this alpha even empty projects dont work when uploaded to WEBGL. it stops loading at 90%.

    tried few hostings, including my and itch.io, effect the same.
     
    bugfinders likes this.
  2. JoNax97

    JoNax97

    Joined:
    Feb 4, 2016
    Posts:
    611
    Do you have a bug report you can share here for the team to track?
     
  3. bugfinders

    bugfinders

    Joined:
    Jul 5, 2018
    Posts:
    1,811
    @mailfromthewilds I just put my main webgl project into the 2020.1.5 beta, and it built up just fine, just tried this alpha and it seems ok too (sillygames.online/temp)

    What compression did you use? I did read in the beta there were some possible issues with the compression builds
     
  4. mailfromthewilds

    mailfromthewilds

    Joined:
    Jan 31, 2020
    Posts:
    217
    it works whhen i turnd compression off. both brotli and gzip didnt work
     
  5. bugfinders

    bugfinders

    Joined:
    Jul 5, 2018
    Posts:
    1,811

    I believe thats a known issue, as there is either some server config, or something else that maybe involved..
     
    Agmdaniel likes this.
  6. harrywenjie

    harrywenjie

    Joined:
    Jun 25, 2018
    Posts:
    12
    You need to setup web.config correctly, and install rewrite for your IIS
    Code (JavaScript):
    1. <?xml version="1.0" encoding="UTF-8"?>
    2. <configuration>
    3.     <system.webServer>
    4.             <staticContent>
    5.                     <remove fileExtension=".unityweb" />
    6.                     <mimeMap fileExtension=".unityweb" mimeType="application/octet-stream" />
    7.             </staticContent>
    8.             <rewrite>
    9.                     <outboundRules>
    10.                         <rule name="Append gzip Content-Encoding header">
    11.                             <match serverVariable="RESPONSE_Content-Encoding" pattern=".*" />
    12.                             <conditions>
    13.                                     <add input="{REQUEST_FILENAME}" pattern="\.unityweb$" />
    14.                             </conditions>
    15.                             <action type="Rewrite" value="gzip" />
    16.                         </rule>
    17.                     </outboundRules>
    18.             </rewrite>
    19.     </system.webServer>
    20. </configuration>
     
  7. bugfinders

    bugfinders

    Joined:
    Jul 5, 2018
    Posts:
    1,811