Unity打包WebGL报Unable to parse Build/*.framework.js.gz This can happen if build compression was.......

Unity版本:2021.3.8f1c1(LTS)

0.错误完整信息:

Unable to parse Build/*.framework.js.gz! This can happen if build 
compression was enabled but web server hosting the content was 
misconfigured to not serve the file with HTTP Response Header "Content-
Encoding: gzip" present. Check browser Console and Devtools Network tab 
to debug.
 

在这里插入图片描述
手机版和PC版的Chrome浏览器关于这个错误的报错信息都是一致的。

解决方法,在Unity的WebGL Player Settings中的Publishing settings选项卡中,把Decompression Fallback 选项勾上即可。

在这里插入图片描述
Decompression Fallback官方解释

在这里插入图片描述
链接:Unity - Manual: WebGL Player settings

猜你喜欢

转载自blog.csdn.net/weixin_43149049/article/details/128079190