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>

然后就能运行了

posted @ 2022-06-22 18:04  哒哒哒~~~  阅读(1649)  评论(0编辑  收藏  举报