Unity WebGL报错:HTTP Response Header “Content-Type“ configured incorrectly on the server for file

WebGL报错:HTTP Response Header "Content-Type" configured incorrectly on the server for file Build/KZ.wasm , should be "application/wasm". Startup time performance will suffer.

在**.loader.js文件找到以下内容删除:console.error(e),"string"==typeof e&&e.indexOf("wasm streaming compile failed")!=-1&&(e.toLowerCase().indexOf("mime")!=-1?n('HTTP Response Header "Content-Type" configured incorrectly on the server for file '+c.codeUrl+' , should be "application/wasm". Startup time performance will suffer.',"warning"):n('WebAssembly streaming compilation failed! This can happen for example if "Content-Encoding" HTTP header is incorrectly enabled on the server for file '+c.codeUrl+", but the file is not pre-compressed on disk (or vice versa). Check the Network tab in browser Devtools to debug server header configuration.","warning"))

你可能感兴趣的:(Unity报错处理,unity,webgl,http)