Version: 2022.3
Override the Android App Manifest
Build your application for Android

Android Build Settings

Use the Android Build Settings to configure and build your application for Android devices. The Android Build Settings are part of the Build Settings window. To view the Android Build Settings:

  1. Select File > Build Settings.
  2. From the list of platforms in the Platform pane, select Android.
    Note: If Android is greyed out, follow the steps on Android environment setup.
  3. If the Build button isn’t visible and Build And Run is greyed out, select Switch Platform. The Android Build Settings now have an effect on the build.

Build settings

This section explains each Android Build Setting. For information on the rest of the Build Settings window, refer to Build Settings window.

设置 描述
Texture Compression The texture compression format to use for the build. The options are:
Use Player Settings: Uses the texture compression format you set in Player Settings.
ETC (GLES 2.0): Uses ETC format.
ETC2 (GLES 3.0): Uses ETC2 format.
ASTC: Uses ASTC format.
DXT (Tegra): Uses DXT format.
PVRTC (PowerVR): Uses PVRTC format.

You can also change this setting from a script or using the -setDefaultPlatformTextureFormat command-line switch.

For more information, see Recommended, default, and supported texture compression formats, by platform.
ETC2 fallback Specifies the uncompressed RGBA texture format that Unity uses for Android devices that don’t support ETC2. This affects the amount of memory uncompressed textures use and their image quality. The options are:
32-bit: Stores RGBA textures in full resolution using 32 bits to store each pixel (8 bits per color channel). This is the highest quality uncompressed texture format and uses the most memory.
16-bit: Stores RGBA textures in full resolution using 16 bits to store each pixel (4 bits per color channel). This uses half of the memory that 32-bit uses, but textures can lose valuable color information because of the lower precision.
32-bit, half resolution: Stores RGBA textures in half resolution using 32 bits to store each pixel (8 bits per color channel). This uses a quarter of the memory that 32-bit uses, but the texture can become blurry.

Note: If a texture doesn’t use ETC2 compression format:
• Most compression formats use the 32-bit fallback.
• Single-channel and two-channel texture compression formats fall back to a different format depending on what the GPU supports. For example, it could be R8_UNorm or R8G8B8A8_SRGB.
• ASTC HDR formats fall back to a floating-point format if the GPU supports it. Otherwise, they fall back to 32-bit.
Export Project Indicates whether to export the Unity project as a Gradle project that you can import into Android Studio. For more information, refer to Exporting an Android project.
Symlink Sources Indicates whether to share Java and Kotlin source files between the Unity and exported Gradle project.

Enable this setting to create symbolic links so the Gradle project references Java and Kotlin source files in the Unity project. This is useful to test and iterate Java and Kotlin code because it means any changes you make to Java and Kotlin source files in the exported Gradle project persist if you re-export the Unity project.

Disable this setting to make Unity copy Java and Kotlin source files from the Unity project into the exported Gradle project.

You can only interact with this setting if you enable Export Project.
Build App Bundle (Google Play) Indicates whether to build the application as an Android App Bundle (AAB) to distribute on Google Play. If you enable this setting, Unity builds the application as an AAB. If you disable this setting, Unity builds the application as an APK.

The setting only appears if you disable Export Project.
Export for App Bundle Indicates whether to configure the exported Gradle project to build as an Android App Bundle.

The setting only appears if you enable Export Project.
Create symbols.zip Specifies how Unity generates a symbols package when it builds your application. The options are:
Disabled: Unity doesn’t generate a symbols package.
Public: Unity generates a public symbols package for your application.
Debugging: Unity generates a debugging symbols package for your application.
Run Device Specifies which attached device to test the build on. Devices connected via USB should appear in the list automatically. If you connect a new device or don’t see an attached device in the list, click Refresh. To connect a new device wirelessly over Android Debug Bridge, select the <Enter IP> option. For more information, refer to Debugging on an Android device or Debugging on a ChromeOS device, depending on the platform you want to build for.
Build to Device A build pipeline that doesn’t create a full build and instead deploys single files that changed since the last patch directly to the device. Patch deploys changed files to the devices and Patch And Run deploys changed files and then runs the application on the device. For more information, refer to Application patching.

You can only interact with this setting if you enable Development Build.
Development Build Indicates whether to include scripting debug symbols and the Profiler in your build. Use this setting when you want to test your application.
When you select this option, Unity sets the DEVELOPMENT_BUILD scripting define. Your build then includes preprocessor directives that set DEVELOPMENT_BUILD as a condition. For more information, refer to Platform-dependent compilations.
Autoconnect Profiler Indicates whether to automatically connect the Profiler to the built application when it runs.

You can only interact with this setting if you enable Development Build.
Deep Profiling Support Indicates whether to enable Deep Profiling in the Profiler. This makes the Profiler instrument every function call in your application so it returns more detailed profiling data. This option might slow down script execution.

You can only interact with this setting if you enable Development Build.
Script Debugging Indicates whether to allow debugging for the application’s script code.

You can only interact with this setting if you enable Development Build.
Wait For Managed Debugger Indicates whether the application waits for a debugger to attach before it runs any script code.

This setting only appears if you enable Script Debugging. Also, you can only interact with this setting if you enable Development Build.
Compression Method Specifies the method Unity uses to compress the data in your Project when it builds the Player. This includes Assets, Scenes, Player settings, and GI data. The options are:
Default: Uses ZIP which gives slightly better compressions results than LZ4 and LZ4HC but data is slower to decompress.
LZ4: Uses LZ4, a fast compression format that’s useful for development builds. Using LZ4 compression instead of ZIP can significantly improve loading time for Unity applications. For more information, refer to BuildOptions.CompressWithLz4.
LZ4HC: A high compression variant of LZ4 that’s slower to build but produces better results for release builds. Using LZ4HC compression instead of ZIP can significantly improve loading time for Unity applications. For more information, refer to BuildOptions.CompressWithLz4.
Override the Android App Manifest
Build your application for Android