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>

然后就能运行了

Logo

腾讯云面向开发者汇聚海量精品云计算使用和开发经验,营造开放的云计算技术生态圈。

更多推荐