Version: 2017.1
偏好设置
Settings Managers

Build Settings

在 Build Settings 窗口中可以选择目标平台,调整构建设置,以及启动构建过程。要访问 Build Settings 窗口,请选择 File > Build Settings…。指定构建设置后,可单击 Build 创建构建版本,或单击 Build And Run 在指定的平台上创建并运行构建版本。

Build Settings 窗口
Build Settings 窗口

Scenes in Build

窗口的这一部分显示了项目中将包含在构建中的场景。如果没有显示场景,则可以使用 Add Current 按钮将当前场景添加到构建中,或者可以从 Project 窗口将场景资源拖动到此窗口中。也可以取消选中此列表中的场景以将其从构建中排除,而无需将其从列表中删除。如果构建中不再需要某个场景,则可以通过按 Delete 键将其从场景列表中删除。

勾选并添加到 Scenes in Build 列表中的场景将包含在构建中。场景列表将用于控制场景的加载顺序。可以通过向上或向下拖动来调整场景的顺序。

平台列表

Scenes in Build 区域下方的 Platform 区域列出了您的 Unity 版本可用的所有平台。某些平台可能会显示为灰色,表示它们不属于您的版本,或者用于邀请您下载平台特定的构建选项。选择其中一个平台将控制将构建哪个平台。如果更改目标平台,则需要按“Switch Platform”按钮应用更改。此过程可能需要一些时间进行切换,因为可能需要使用与目标平台匹配的格式重新导入资源。当前选定的平台会在平台名称右侧显示 Unity 图标。

所选平台将显示可针对该构建进行调整的选项列表。每个平台可能有不同的选项。下面列出了这些选项。许多平台共同的选项列在本节最底部的“通用构建选项”详细信息中。

PC, Mac & Linux Standalone

选项 目的
Target Platform
        Windows 以 Windows 为构建目标
        Mac OS X 以 Mac 为构建目标
        Linux 以 Linux 为构建目标
Architecture x86
        x86 32 位 CPU
        x86_64 64 位 CPU
        Universal 所有 CPU 设备
        x86 + x86_64 (Universal) 适用于 Linux 的所有 CPU 设备
Headless Mode 构建游戏以供服务器使用,没有视觉元素

iOS

选项 目的
Run in Xcode as
        Release Shipping version
        Debug Testing version
Symlink Unity libraries Reference to the Unity libraries instead of copying them into the XCode project. (Reduces the XCode project size.)

Android

选项 目的
Texture Compression
        Don’t override
        DXT Tegra)
        PVRTC (PowerVR)
        ATC (Adreno)
        ETC (default)
        ETC2 (GLES 3.0)
        ASTC
Build System
        Internal (Default) Generate the output package (APK) using the internal Unity build process, based on Android SDK utilities.
        Gradle (New) Generate the output package (APK) using the Gradle build system. Supports direct Build and Run and exporting the project to a directory. This is the preferred option for exporting a project, as Gradle is the native format for Android Studio.
        ADT (Legacy) Export the project in ADT (eclipse) format. The output package (APK) can be built in eclipse or Android Studio. This project type is no longer supported by Google and is considered obsolete.

Tizen

Build Settings for Tizen use the generic settings shown later on this page.

WebGL (Preview)

选项 目的
Optimization Level Active when Development Build is selected
        Slow (fast builds)
        Fast
        Fastest (very slow builds)

Samsumg TV

Build Settings for Samsumg TV use the generic settings shown later on this page.

其他平台

在《用户指南》的“特定于平台的信息”部分介绍了需要 Unity 许可证的游戏主机平台和设备。

通用构建选项

选项 目的
Development Build 允许开发人员测试并确定构建的进展方式。
Autoconnect Profiler 选择 Development Build 选项后,允许性能分析器连接到构建版本。
Script Debugging 选择 Development Build 选项后,允许调试脚本代码。在 WebGL 上不可用。

• 2017–05–16 页面已修订但未经编辑审查

偏好设置
Settings Managers
Copyright © 2023 Unity Technologies
优美缔软件(上海)有限公司 版权所有
"Unity"、Unity 徽标及其他 Unity 商标是 Unity Technologies 或其附属机构在美国及其他地区的商标或注册商标。其他名称或品牌是其各自所有者的商标。
公安部备案号:
31010902002961