直接将导出的WebGL项目文件放置到服务器,然后通过浏览器远程打开报错:
An error occured running the Unity content on this page. See your browser's JavaScript console for more info. The error was:
uncaught exception: incorrect header check
翻译:在本页上运行Unity内容时出现错误。更多信息请查看浏览器的JavaScript控制台。错误是:
未捕获的异常:不正确的头检查
办法1:在服务器的IIS上添加MIME类型:application/octet-stream 扩展名:.unity3d即可。
办法2:
在mime.json文件夹中添加unity3d发布webgl后需要的类型
".memgz":"application/octet-stream",
".datagz":"application/octet-stream",
".unity3dgz":"application/octet-stream",
".jsgz":"application/x-javascript; charset=UTF-8",
".*":"application/octet-stream"
详解链接:http://blog.csdn.net/tankerhunter/article/details/53741937
**然而我现在根据网上找到的方法仍然还没解决问题!!!