Web development and publishing process
An overview of the steps to build, test, and publish an application on the Web platform.
Read time 2 minutesLast updated 12 days ago
Build and deploy a Web application in mobile and desktop environments.
Before you get started, check the browser compatibility and technical limitations for Web. Make sure you’re aware of any limitations for developing a project for this platform.
For a guided tutorial of the Web platform, refer to Getting started with Unity Web.
To build and deploy a Web application, complete the following tasks:
Add the Web module
To get started with Web, add the Web module to your project. Once you add the module, you can access the Web Player and Build settings.
Set up a testing environment
Browser security policies restrict loading scripts from URLs, so you can't open a Web build directly from your file system by double-clicking .
file://index.htmlTo test your project, do either of the following:
- Use the Build and Run option in the Unity Editor’s Build Profiles window.
- Run your own web server.
If you run your own web server, Unity doesn’t need to rebuild the project for every test. For a simple local server, try running one of these options:
- Python:
python -m http.server - Node.js:
npx http-server
For more advanced server configurations, refer to Server configuration code samples and Deploy a web application for information about running your own server.
Profile and optimize
Before you publish, gather performance metrics and reduce the build size to make a project that runs smoothly with the best quality possible.
Profile your Web build to get performance data and refer to Optimize your Web build and Optimize Web platform for mobile.
Host your build
You need to host projects online to make them accessible to users. Use web hosting services such as Unity Play depending on your needs.