an error occurred running the unity content on this page. see your browser javascript console for mo

unity 开发WebGL发布后无法打开并提示
an error occurred running the unity content on this page. see your browser javascript console for more info. the error was: uncaught syntaxerror: unexpected tokrn’<’
在这里插入图片描述

解决办法,添加一个配置文件
在这里插入图片描述

文件内容:

<configuration>
  <system.webServer>
    <staticContent>
      <mimeMap fileExtension=".unityweb" mimeType="application/binary" />
      <mimeMap fileExtension=".unity3d" mimeType="application/octet-stream"/>
    </staticContent>
    <urlCompression doDynamicCompression="false"/>
  </system.webServer>
</configuration>

然后就能运行了

猜你喜欢

转载自blog.csdn.net/weixin_45023328/article/details/124737232
今日推荐