找回密码
 立即注册
查看: 270|回复: 0

Unity打包webGL无法在服务正常运行

[复制链接]
发表于 2021-12-26 19:15 | 显示全部楼层 |阅读模式
报错内容:
Unable to parse Build/RobotTest.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.
解决办法:
Edit -> Project Settings -> Player -> WebGL settings -> Publishing Settings勾选Decompression Fallback

WechatIMG40.png

注:如何本地运行WebGL
cd WebGL文件目录python -m http.server

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?立即注册

×
懒得打字嘛,点击右侧快捷回复 【右侧内容,后台自定义】
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

小黑屋|手机版|Unity开发者联盟 ( 粤ICP备20003399号 )

GMT+8, 2024-5-30 04:35 , Processed in 0.091470 second(s), 26 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表