# Web 开发和发布流程

> An overview of the steps to build, test, and publish an application on the Web platform.

在移动端和桌面端环境中构建和部署 Web 应用程序。

在开始之前，请查看 Web 的[浏览器兼容性](/engine/6000.0/manual/platform-specific/webgl/intro/browsercompatibility.md)和[技术限制](/engine/6000.0/manual/platform-specific/webgl/intro/technical-overview.md)。确保您了解为此平台开发项目的所有限制。

有关 Web 平台的引导教程，请参阅 [Unity Web 入门](https://learn.unity.com/tutorial/getting-started-with-unity-web)。

要构建和部署 Web 应用程序，请完成以下任务：

* [添加 Web 模块](#add-module)
* [设置测试环境](#test)
* [性能分析和优化](#profile-optimize)
* [托管构建](#host)

## 添加 Web 模块##add-the-web-module

要开始使用 Web，请将 [Web 模块添加](https://docs.unity3d.com/hub/manual/AddModules.html)到项目中。添加模块后，即可访问 Web **播放器**和**构建**设置。

## 设置测试环境##set-up-a-testing-environment

要测试项目，请执行以下操作之一：

* 使用 Unity 编辑器[构建设置 (Build Settings)](/engine/6000.0/manual/unity-editor/editor-features/build-settings/build-profiles-reference.md) 中的**构建并运行 (Build and Run)** 选项。
* 运行您自己的 Web 服务器。

如果您运行自己的 Web 服务器，Unity 不需要在每次测试时重新构建项目。请参阅服务[器配置代码示例](/engine/6000.0/manual/platform-specific/webgl/building-distribution/server-configuration-code-samples.md)并[部署 Web 应用程序](/engine/6000.0/manual/platform-specific/webgl/building-distribution/deploying.md)以了解有关运行您自己的服务器的信息。

## 性能分析和优化##profile-and-optimize

在发布之前，请收集性能指标并减小构建大小，使项目能够以尽可能好的质量顺利运行。

使用[Unity 性能分析器](/engine/6000.0/manual/analysis/profiler.md)获取性能数据，请参阅[优化 Web 构建](/engine/6000.0/manual/platform-specific/webgl/building-distribution/web-optimization.md)和[为移动端优化 Web 平台](/engine/6000.0/manual/platform-specific/webgl/building-distribution/web-optimization-mobile.md)。

## 托管构建##host-your-build

您需要在线托管项目才能让用户访问。根据您的需求使用 Web 托管服务，例如 [Unity Play](https://play.unity.com/en)。

## 其他资源##additional-resources

* [Unity 学习教程：Unity Web 入门](https://learn.unity.com/tutorial/getting-started-with-unity-web)
* [Web 播放器设置](/engine/6000.0/manual/platform-specific/webgl/develop/class-player-settings-web-gl.md)
* [Web 构建设置](/engine/6000.0/manual/platform-specific/webgl/building-distribution/web-build-settings.md)
* [Web 中的内存](/engine/6000.0/manual/platform-specific/webgl/develop/memory.md)
* [Web 图形](/engine/6000.0/manual/platform-specific/webgl/develop/graphics.md)
