greggman / better-unity-webgl-template

A better default template for Unity WebGL
https://greggman.github.io/better-unity-webgl-template/
Creative Commons Zero v1.0 Universal
760 stars 137 forks source link

Hey! Template works on LocalHost when build and run, but does not work when uploading game on server #25

Open Sulamanidze1 opened 1 year ago

Sulamanidze1 commented 1 year ago

Hey ! This really works on localHost, but when I upload the project on server, the project crashes, just small black squire appears and this is error message: .loader.js:1 wasm streaming compile failed: TypeError: Failed to execute 'compile' on 'WebAssembly': Incorrect response MIME type. Expected 'application/wasm'.

Also I tried to add this in blank project, it works but when I import my game package, still does not works.. Any ideas? big thanks anyway for this asset!

greggman commented 1 year ago

It's got nothing to do with the template. You have to configure your server

https://docs.unity3d.com/2019.4/Documentation/Manual/Webgl-Server-configuration-for-WebAssembly-streaming.html