当前位置:网站首页>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 
边栏推荐
- Enum
- pkg打包node工程(express)
- Data middle office: construction ideas and implementation experience of data governance
- CAD secondary development +nettopologysuite+pgis reference multi version DLL
- 脚本语言和编程语言
- 【无标题】
- idea根据数据库表生成实体类
- The length of pytorch dataloader the difference between epoch and iteration
- easyui 重置多条件查询
- Lenovo hybrid cloud Lenovo xcloud, new enterprise IT service portal
猜你喜欢

Socket. Io long Connection Push, version Control, Real - Time Active user volume Statistics

Binder interview: memory management unit

Where is the era bonus for developers?

YYGH-6-微信登录

YYGH-7-用户管理

How popular are FB and WhatsApp mass messages in 2022?

Lombok @equalsandhashcode annotation how to make objects The equals () method compares only some attributes

移动广告发展动向:撬动存量,精细营销

Slow content advertising: the long-term principle of brand growth

How to add live chat in your Shopify store?
随机推荐
借助nz-pagination中的let-total解析ng-template
YYGH-7-用户管理
sql及list去重操作
Ape pink ape power - Developer activity attack!
基于Kotlin+JetPack实现的MVVM框架的示例
6. 毕业设计温湿度监控系统(ESP8266 + DHT11 +OLED 实时上传温湿度数据给公网服务器并在OLED显示屏上显示实时温湿度)
AutoCAD C # Polyline Small Sharp angle Detection
lombok @EqualsAndHashCode 注解如何让对象.equals()方法只比较部分属性
Introduction to uicollectionviewdiffabledatasource and nsdiffabledatasourcesnapshot
Mosaic data enhanced mosaic
Openharmony gnawing paper growth plan -- json-rpc
API learning of OpenGL (2006) glclientactivetexture
Configure multiple database connections using the SSM framework
Lenovo hybrid cloud Lenovo xcloud, new enterprise IT service portal
Xcode13.3.1 项目执行pod install后报错
pkg打包node工程(express)
Working principle of es9023 audio decoding chip
The windows environment redis uses AOF persistence and cannot generate an AOF file. After generation, the content of the AOF file cannot be loaded
Caused by: com. fasterxml. jackson. databind. Exc.invalidformatexception: exception resolution
Sharing tips for efficient scripting