当前位置:网站首页>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 
边栏推荐
- API learning of OpenGL (2007) gltexcoordpointer
- 基于Kotlin+JetPack实现的MVVM框架的示例
- Data warehouse: detailed explanation of hierarchical design
- Drop down box for implementation
- AutoCAD C# 多段线自相交检测
- AutoCAD C polyline small acute angle detection
- ThreadLocal
- Apple MDM Bypass 免越狱绕过MDM配置锁 免费
- Yygh-7-user management
- CAD secondary development +nettopologysuite+pgis reference multi version DLL
猜你喜欢

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

深度學習19種損失函數

Prime mover × Cloud primordial is making sound, reducing cost and increasing efficiency lecture hall

YYGH-6-微信登录

Development trend of mobile advertising: Leveraging stock and fine marketing

报错--解决core-js/modules/es.error.cause.js报错

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

Difficulty calculation of Ethereum classic

借助nz-pagination中的let-total解析ng-template

ES9023音频解码芯片的工作原理
随机推荐
bash install. SH ******** error
Caused by: com.fasterxml.jackson.databind.exc.InvalidDefinitionException: Cannot construct instance
Small ball playing
Prime mover × Cloud primordial is making sound, reducing cost and increasing efficiency lecture hall
Syn retransmission caused by IPVS
JSP
CAD secondary development +nettopologysuite+pgis reference multi version DLL
What is webrtc?
What is the e-commerce conversion rate so abstract?
[MySQL] all query tables contain 20million data -- how to optimize SQL
YYGH-8-预约挂号
JQ picture amplifier
ES9023音频解码芯片的工作原理
Enum
bash install.sh ********错误
Data center: Seven Swords of data governance
Difficulty calculation of Ethereum classic
Configure redis from 0
death_satan/hyperf-validate
sql及list去重操作