0% found this document useful (0 votes)
25 views33 pages

Deploy I Is Guide

Uploaded by

CườngGermany
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as XLSX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
25 views33 pages

Deploy I Is Guide

Uploaded by

CườngGermany
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as XLSX, PDF, TXT or read online on Scribd
You are on page 1/ 33

Step 1: Download resource

1. Download resourve from drive

Step 2: Enable IIS on Windows

1. Install IIS (if not already installed):

Open Control Panel > Programs > Turn Windows features on or off.
Check Internet Information Services (IIS) and click OK.
Wait for the installation to complete.
Step 3: Set Up Your Unity WebGL Application on IIS

1. Open IIS Manager:


Press Windows + S, search for IIS Manager, and open it.

2. Add a new website:

In the left panel, right-click Sites and select Add Website.


Fill in the required fields:
Site Name: 3d-map-app (or a name of your choice).
Physical Path: Browse to the folder where you exported your Unity WebGL build (the folder containing index.html).
Binding: Set the following:
Type: http.
IP Address: All Unassigned.
Port: 8086 (or another port you prefer).
Click OK.
Note: How to choose IP when configuring binding in IIS

Local IP:
When you select All Unassigned, IIS will automatically listen to all IP addresses assigned to your server. This means that if you
If you choose a specific IP (e.g., 192.168.1.100), IIS will only listen on that IP, but this is the local IP of the server (typically used

Public IP:
When your server has a public IP (which may be a static IP provided by the Internet Service Provider), this IP will be different f
To have IIS receive traffic from the public IP, you do not need to enter the public IP directly into IIS, but you will need to config
Port Forwarding is the way your router redirects requests to a port (e.g., port 80 for HTTP) from the public IP to the correspon

3. Grant permissions to IIS:

Right-click the build folder > Properties > Security tab.


Click Edit > Add, then add the user group IIS_IUSRS.
Grant Full control permision.

Step 4: Configure MIME Types for Unity WebGL Files


Unity WebGL requires specific MIME types to serve its .data, .wasm, and .js files correctly.

1. Add MIME types in IIS:

In IIS Manager, select your Unity WebGL site (e.g., 3d-map-app).


Double-click MIME Types in the middle panel.
Click Add... on the right-hand side and add the following entries:
.data: application/octet-stream
.wasm: application/wasm
.framework: application/javascript
2. Click OK.
Note: If it already exists, ignore it.

Step 5: Config authentication

Click site and then double click Authenticaiton

Choose Anonymous Authentication and click Edit in right panel

Choose Application pool identity and click Ok


Step 6: Enable Compression for Faster Loading (Optional)

Unity WebGL exports files that may be compressed with Gzip or Brotli to reduce size.

1. Enable static compression in IIS:

In IIS Manager, select your site.


Double-click Compression.
Ensure Enable static content compression is checked.
Step 7: Test the Deployment

1. Start the website:

In IIS Manager, right side panel, click Start.


2. Add cross domain extension
If after running the web you encounter a CORS error as below. Install the Cross domain extension to fix it.
The Cross-Domain extension temporarily disables or modifies browser-level CORS policies, allowing your web application t
3. Access the application:
After installing cross domain extension, press F5 to reload the website.
You should see your Unity WebGL application running.
Final Notes
You’ve successfully deployed your Unity WebGL application on IIS!
r containing index.html).
server. This means that if you have a public IP and one or more private IPs on your server, IIS will listen to all of them.
IP of the server (typically used in internal LAN networks).

ider), this IP will be different from the local IP (LAN IP).


IIS, but you will need to configure Port Forwarding on the router or firewall to forward traffic from your public IP to the private IP of the se
the public IP to the corresponding port of the server in the LAN network.
nsion to fix it.
lowing your web application to make requests to external domains that would otherwise be blocked by the browser due to CORS restrictio
lic IP to the private IP of the server running IIS (for example, a LAN IP like 192.168.x.x).
browser due to CORS restrictions.

You might also like