文档

​
​

Development

User Acquisition

Monetization

工业

Build Automation

DevOps

Build Automation REST API

Build Automation Editor Package

Open Unity Dashboard

Build Automation

​
​
Build Automation
  • Overview
  • Get started with Build Automation
  • Build Automation Glossary
  • Build configuration
  • Advanced build configuration
  • Run builds
  • Check build results
  • Optimize build speed
    • Choose a machine specification
    • Select a caching strategy
    • Select build output compression level
    • Choose a Git Executable
  • Manage consumption costs
  • Sign build artifacts
  • Build Automation integrations
  • Build Automation API
  • Build Automation Editor Package
  • Reference
  1. Unity Build Automation
  2. Optimize build speed

选择构建输出压缩级别

Explore build output compression levels to balance speed and file size.
阅读时间3 分钟
最后更新于 1 年前

Unity Build Automation (UBA) 会在 Unity 构建完成之后、UBA 将构建上传到存储桶之前,对一些构建输出进行压缩。UBA 默认使用压缩级别 1。
通常,Unity 生成的构建已经过压缩。就压缩时间和最终压缩文件大小而言,压缩级别 1 是最有效的压缩级别。
不过,根据项目、平台和 Unity 构建输出压缩技术(
None
、
LZ4
或
LZ5 HC
)等因素,可能需要更改最终构建输出压缩级别。一般来说,较低的压缩级别会减少构建输出的压缩时间,但最终的压缩文件会更大。
您可以编辑压缩级别来测试哪个级别最适合您的项目。例如,您可以评估压缩时间和最终压缩文件大小,从而找到适合项目和性能阈值的最佳构建输出压缩级别。

压缩的构建输出文件

以下构建输出文件已压缩,并且会受到构建输出压缩级别设置的影响:
  • 桌面端、WebGL 和控制台构建
  • 符号文件
  • XCode 存档和项目

配置构建输出压缩级别

可以在两个级别配置构建输出压缩级别:针对特定项目,或针对构建目标配置。

针对项目配置构建输出压缩级别

  1. 在 Unity Dashboard 中,选择 DevOps > Build Automation > Settings(设置)。
  2. 单击 Project configurations(项目配置) 选项卡。
  3. 在 Build output(构建输出)卡片中,选择要使用的构建输出压缩级别。
  4. 单击 Save(保存)。

针对构建目标配置配置构建输出压缩级别

注意
注意:此选项覆盖特定构建目标的项目级别构建输出压缩级别设置。
  1. 在 Unity Dashboard 中,选择 DevOps > Build Automation > Configurations(配置)。
  2. 选择要编辑的构建配置上的编辑图标,然后转到 Advanced Settings(高级设置)。
  3. 在 Build Output(构建输出) 卡片中,选择构建输出压缩级别。
  4. 默认选项是 Use project's build output compression level(使用项目的构建输出压缩级别),使用此选项时会从项目设置继承压缩级别,但您可以针对当前构建目标覆盖此设置。
  5. 单击 Save changes(保存更改)。

Copyright © 2026 Unity Technologies
法律信息隐私政策CookiesDocumentation Terms of Use请勿出售或分享我的个人信息您的隐私选择(Cookie 设置)

“Unity”、Unity 徽标及其他 Unity 商标是 Unity Technologies 或其附属公司在美国和其他地方的商标或注册商标(此处查看更多信息)。其他名称或品牌是其各自所有者的商标。

为方便起见,一些页面是机器翻译的,可能包含不准确的内容。如有信息不一致的情况,以英文版本为准。

  • 在本页上
    • 压缩的构建输出文件

    • 配置构建输出压缩级别

      • 针对项目配置构建输出压缩级别

      • 针对构建目标配置配置构建输出压缩级别


报告此页面的问题