用谷歌浏览器打开本地unity webgl报错

问题描述

unity打包webgl,双击index.html,用谷歌浏览器打开,报错:
Failed to download file Build/Test4_Build_WebGL.framework.js.unityweb. Loading web pages via a file:// URL without a web server is not supported by this browser. Please use a local development web server to host Unity content, or use the Unity Build and Run option.
在这里插入图片描述


解决方案:

可以把文件放到本地服务器上,通过本地服务器打开webgl就不会报
在这里插入图片描述

关于如何配置本地服务器,可以自行百度

猜你喜欢

转载自blog.csdn.net/zjjjjjjj_/article/details/127567917