当前位置:网站首页>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 
边栏推荐
- 从0配置redis
- Object对象转 List集合
- YYGH-BUG-02
- Data middle office: six questions data middle office
- 脚本语言和编程语言
- Introduction to openscap
- EasyUI reset multi condition query
- Install redis on windows and permanently change the password, and integrate redis with the SSM framework
- YYGH-BUG-03
- socke.io長連接實現推送、版本控制、實時活躍用戶量統計
猜你喜欢

Oracle fundamentals summary

容量调度绝对值配置队列使用与避坑

What is webrtc?

YYGH-BUG-02

YYGH-7-用户管理

函数栈帧的创建和销毁

High quality domestic stereo codec cjc8988, pin to pin replaces wm8988

6. graduation design temperature and humidity monitoring system (esp8266 + DHT11 +oled real-time upload temperature and humidity data to the public network server and display the real-time temperature

Apple MDM bypass jailfree bypass MDM configuration lock free

Ethereum Classic的难度计算|猿创征文
随机推荐
YYGH-BUG-03
Small ball playing
Where is the era bonus for developers?
Filecoin hacker song developer competition
easyui 重置多条件查询
Independent station sellers are using the five e-mail marketing skills, do you know?
ThreadLocal
从0配置redis
若依实现下拉框
Pre training model parameter mismatch
YYGH-8-预约挂号
Development trend of mobile advertising: Leveraging stock and fine marketing
No one can only use foreach to traverse arrays, right?
Install and manage multiple versions of PHP under mac
OpenSCAP 简介
Capacity scheduling absolute value configuration queue usage and pit avoidance
Caused by: com. fasterxml. jackson. databind. exc.InvalidDefinitionException: Cannot construct instance
Yygh-6-wechat login
Configure multiple database connections using the SSM framework
How popular are FB and WhatsApp mass messages in 2022?