当前位置:网站首页>Unity packaging webgl uses IIS to solve the error
Unity packaging webgl uses IIS to solve the error
2022-06-28 06:04:00 【The way of growth】
1.
By default ,IIS The server does not provide unknown MIME Static content of type . In order to make Unity Build the ability to IIS To work on , First, you need to .unityweb Extension and application/octet-stream Content types are associated . There are two ways to achieve this :
Use IIS Manager Interface : stay IIS Manager Select your website in the panel , open MIME Types function , And then choose Add… operation . take .unityweb Set to file extension , And will application/octet-stream Set to MIME type , And then click OK.
Use the server configuration file : IIS Use web.config File implementation server configuration . These profiles reflect IIS Manager All changes made to a specific folder in . In order to application/octet-stream MIME The type and .unityweb Extension is associated with
2.
about gzip Compressed build , Please send the following web.config File put in Build A folder :
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<staticContent>
<remove fileExtension=".unityweb" />
<mimeMap fileExtension=".unityweb" mimeType="application/octet-stream" />
</staticContent>
<rewrite>
<outboundRules>
<rule name="Append gzip Content-Encoding header">
<match serverVariable="RESPONSE_Content-Encoding" pattern=".*" />
<conditions>
<add input="{REQUEST_FILENAME}" pattern="\.unityweb$" />
</conditions>
<action type="Rewrite" value="gzip" />
</rule>
</outboundRules>
</rewrite>
</system.webServer>
</configuration>
about brotli Compressed build , Please send the following web.config File put in Build A folder :
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<staticContent>
<remove fileExtension=".unityweb" />
<mimeMap fileExtension=".unityweb" mimeType="application/octet-stream" />
</staticContent>
<rewrite>
<outboundRules>
<rule name="Append br Content-Encoding header">
<match serverVariable="RESPONSE_Content-Encoding" pattern=".*" />
<conditions>
<add input="{REQUEST_FILENAME}" pattern="\.unityweb$" />
</conditions>
<action type="Rewrite" value="br" />
</rule>
</outboundRules>
</rewrite>
</system.webServer>
</configuration>
Attach one and pack it yourself webgl The screenshots 
边栏推荐
- 【Paper Reading-3D Detection】Fully Convolutional One-Stage 3D Object Detection on LiDAR Range Images
- pkg打包node工程(express)
- 不会还有人只会用forEach遍历数组吧?
- Slow content advertising: the long-term principle of brand growth
- Caused by: com.fasterxml.jackson.databind.exc.InvalidFormatException:异常解决
- windows上安装redis并永久修改密码,及ssm框架集成redis
- Filecoin hacker song developer competition
- 学术搜索相关论文
- Lombok @equalsandhashcode annotation how to make objects The equals () method compares only some attributes
- How to add live chat in your Shopify store?
猜你喜欢

socke.io长连接实现推送、版本控制、实时活跃用户量统计

自定义 cube-ui 弹出框dialog支持多个且多种类型的input框

AutoCAD C # Polyline Small Sharp angle Detection

Install and manage multiple versions of PHP under mac

Caused by: com. fasterxml. jackson. databind. exc.InvalidDefinitionException: Cannot construct instance

AutoCAD C# 多段线自相交检测

Jenkins持续集成1

Binder interview: memory management unit

AutoCAD C# 多段線小銳角檢測

Common basic functions of Oracle
随机推荐
Object object to list collection
基于Kotlin+JetPack实现的MVVM框架的示例
The length of pytorch dataloader the difference between epoch and iteration
[untitled]
Openharmony gnawing paper growth plan -- json-rpc
Development trend of mobile advertising: Leveraging stock and fine marketing
Differences between basic types and packaging classes
idea创建类时自动添加注释
若依实现下拉框
Valueerror: iterative over raw text documents expected, string object received
PKG package node project (express)
Deep learning 19 loss functions
death_ satan/hyperf-validate
简单手写debounce函数
Failed to start component [StandardEngine[Catalina]. StandardHost[localhost]]
Filecoin hacker song developer competition
Install and manage multiple versions of PHP under mac
Idea generates entity classes from database tables
AutoCAD C# 多段线小锐角检测
脚本语言和编程语言