Android 单通道立体渲染
Android 2D 纹理覆盖

Android Player Settings

This page details the Player Settings specific to Android. For a description of the general Player Settings, see documentation on PlayerSettings.

Icon

The Icon section of the Android PlayerSettings window
The Icon section of the Android PlayerSettings window
属性: 功能:
Adaptive 设置应用程序中 Android 自适应图标的纹理。
Round 设置应用程序中 Android 圆形图标的纹理。
Legacy 设置应用程序中 Android 旧版图标的纹理。
Enable Android Banner 为 Android TV 版本启用自定义横幅。

Resolution And Presentation

The Resolution and Presentation section of the Android PlayerSettings window
The Resolution and Presentation section of the Android PlayerSettings window
属性: 功能:
Resolution and Presentation
Preserve framebuffer alpha Enable Unity to render on top of native Android UI. The camera’s Clear Flags have to be set to Solid color with an alpha less than 1 for this to have any effect. (OpenGL ES only).
Resolution Scaling
Resolution Scaling Mode This option can be used to render the scene on the target device at a resolution lower than screen resolution.
    Disabled Render at full screen resolution.
    Fixed DPI Render at resolution potentially lower than screen resolution.
Target DPI When Resolution Scaling Mode is set to Fixed DPI, this setting determines how much lower the target rendering resolution is going to be. The scale is calculated as min(Target DPI * Factor / Screen DPI, 1). Factor is controlled by Quality Settings.
Blit Type Controls whether a blit is used to present the final image to the screen.
    Always (始终 blit)使 Unity 渲染到屏幕外缓冲区,然后复制到系统帧缓冲区。此选项兼容大部分设备,但通常比 Never blit 设置更慢。
    Never (从不 blit)使 Unity 渲染到 OS 提供的帧缓冲区。如果在应用程序运行时出现导致此操作失败的情况,应用程序将向设备日志输出一次性警告。Never blit 通常比 Always blit 更快,但无法兼容所有设备。
    Auto 尽可能使 Unity 渲染到 OS 提供的帧缓冲区。如果满足阻止应用程序渲染到系统帧缓冲区的条件,则应用程序将切换到屏幕外渲染并向设备控制台发出警告。
Support Aspect Ratio
Aspect Ratio Mode The aspect ratio for the device. Choose from: Legacy Wide Screen (1.86), Super Wide Screen (2.1) and Custom. When you select Custom, an Up To field appears. Use this to set a maximum screen width.
方向
Default Orientation Set the application’s screen orientation.
    Portrait Orient the screen so that the device’s Home button is at the bottom.
    Portrait Upside Down Orient the screen so that the device’s Home button is at the top.
    Landscape Left Orient the screen so that the device’s Home button is on the right-hand side.
    Landscape right Orient the screen so that the device’s Home button is on the left-hand side.
Allowed Orientations for Auto Rotation
(Only visible when Default Orientation is set to Auto Rotation)
Portrait 允许纵向方向。
Portrait Upside Down 允许纵向上下翻转方向。
Landscape Right Allow landscape right orientation (home button is on the left side).
Landscape Left Allow landscape left orientation (home button is on the right side).
Other
Use 32-bit Display Buffer Specifies if the Display Buffer should be created to hold 32-bit color values (16-bit by default). Use it if you see banding, or need alpha in your post-processed effects, because they create Render Textures in the same format as the Display Buffer.
Disable Depth and Stencil Tick this checkbox to disable the depth and stencil buffers.
Show Loading Indicator The type of loading progress indicator that should be shown. Options are Don’t Show, Large, Inversed Large, Small and Inversed Small.

Splash Image

属性: 功能:
Virtual Reality Splash Screen Specify the texture that should be used for the Android splash screen on a Virtual Reality application.
Android Splash Screen Specify the texture that should be used for the Android splash screen. The standard size for the splash screen image is 320x480.
Splash Scaling Specify how the splash image is scaled to fit the device’s screen. The options are Center (only scale down), Scale to Fit (letter-boxed) and Scale to Fill (cropped).

See also Unity Splash Screen settings.

Other Settings

渲染

The Rendering section of the Android PlayerSettings window
The Rendering section of the Android PlayerSettings window
属性: 功能:
Color Space The Color Space used for your application. See Linear Lighting for more information.
Auto Graphics API Check this to make Unity auto-select a graphics API from the Open Graphics Library (OpenGL). When checked, Unity will try GLES3.1, and fall back to GLES3 or GLES2 if the device does not support GLES3.1. When unchecked, you can manually pick and reorder the graphics APIs. If only GLES3 is in the list, two additional checkboxes; Require ES3.1 and Require ES3.1+AEP appear, allowing you to force the corresponding graphics API.

Important: GLES3/GLES3.1/AEP requirement is added to your Android manifest only if GLES2 is not in the list, and Minimum API Level is set to JellyBean (API level 18) or higher. In this case only, your application won’t show up on unsupported devices in Google Play Store.
Multithreaded Rendering Check this box to move graphics API calls from Unity’s main thread to a separate worker thread. This can help to improve performance in applications that have high CPU usage on the main thread.
Static Batching Check this box to use Static batching on your build (enabled by default).
Dynamic Batching 选中此复选框可在构建中使用动态批处理(默认情况下启用)。
GPU Skinning Check this box to enable OpenGL ES 3 GPU skinning. To learn more about GPU skinning, see the Wikipedia page on skeletal animation.

Note that this property only supports VR apps, and only works if the Virtual Reality Supported checkbox is ticked.
Graphics Jobs (Experimental) Check this box to instruct Unity to offload graphics tasks (render loops) to worker threads running on other CPU cores. This is intended to reduce the time spent in camera.render on the main thread. This feature is experimental. it may not deliver a performance improvement for your project, and may cause instabilities.

Graphics Jobs are currently only supported when using Vulkan and the checkbox has no effect when using OpenGL ES.
Virtual Reality Supported 如果您的应用程序是虚拟现实应用程序,请启用此选项,然后将所需的 VR SDK 添加到列表中。
Protect Graphics Memory 选中此框可强制仅通过受硬件保护的路径显示图形缓冲区。仅适用于支持该选项的设备。

Identification

The Identification section of the Android PlayerSettings window
The Identification section of the Android PlayerSettings window
属性: 功能:
Package Name The unique application ID, used to uniquely identify your app on the device and in Google Play Store. (Shared between iOS and Android.)
Version Specifies the build version number of the bundle, which identifies an iteration (released or unreleased) of the bundle. The version is specified in the common format of a string containing numbers separated by dots (eg, 4.3.2). (Shared between iOS and Android.)
Bundle Version Code An internal version number. This number is used only to determine whether one version is more recent than another, with higher numbers indicating more recent versions. This is not the version number shown to users; that number is set by the versionName attribute. The value must be set as an integer, such as “100”. You can define it however you want, as long as each successive version has a higher number.

For example, it could be a build number. Or you could translate a version number in “x.y” format to an integer by encoding the “x” and “y” separately in the lower and upper 16 bits. Or you could simply increase the number by one each time a new version is released.
Minimum API Level 运行应用程序所需的最低 Android 版本(API 级别)。
Target API Level 编译应用程序针对的目标 Android 版本(API 级别)。

配置 (Configuration)

The Configuration section of the Android PlayerSettings window
The Configuration section of the Android PlayerSettings window
属性: 功能:
Scripting Runtime Version 选择要在项目中使用的 .NET 运行时。有关更多详细信息,请参阅 Microsoft 的 .NET 文档
     .NET 3.5 Equivalent 一个实现 .NET 3.5 API 的 .NET 运行时。这是默认脚本运行时。
     .NET 4.x Equivalent 一个实现 .NET 4 API 的 .NET 运行时。此 API 比 .NET 3.5 更新,因此提供对更多 API 的访问、与更多外部库兼容并支持 C# 6。
Scripting Backend Select your scripting backend. There are two options: IL2CPP or Mono2x. The default is Mono2x.
    IL2CPP Choose this to set ILC2PP as your scripting backend. See Unity documentation on IL2CPP for more information.
    Mono2x Choose this to set Mono2x as your scripting backend. This is the default option. See Mono’s documentation for more information.
API Compatibility Level Specifies active .NET API profile. See below.

.Net 2.0:NET 2.0 libraries. Maximum .NET compatibility, biggest file sizes

.Net 2.0 Subset: Subset of full .NET compatibility, smaller file sizes
Mute Other Audio Sources) Stops or allows audio from other applications to play in the background while your Unity application is running. Enable this and your Unity application stops audio from background applications, disable this and audio from background applications continue to play alongside your Unity application.
Disable HW Statistics By default, Unity Android applications send anonymous HW statistics to Unity. This provides you with aggregated information to help you make decisions as a developer. Find these statistics at http://stats.unity3d.com/. Check this option to stop Unity sending these statistics.
Target Architectures Allows the application to run on the specified CPUs. Note: Running Android apps in a 64-bit environment has performance benefits and 64-bit apps can address more than 4 GB of memory space.
Install Location 指定设备上的应用程序安装位置(有关详细信息,请参阅有关安装位置的 Android 开发者文档
    Automatic 让操作系统决定。用户可以来回移动应用程序。
    Prefer External 如果可能,将应用程序安装到外部存储(SD 卡)。操作系统不保证会安装到外部存储;如果不能,该应用程序将安装到内部内存。
    Force Internal 强制将应用程序安装到内部内存。用户将无法将应用程序移动到外部存储。
Internet Access When set to Require, this adds the networking (INTERNET) permission to the Android manifest, even if you are not using any networking APIs. This is enabled by default for development builds.
Write Access When set to External(SDCard) , enables write access to the external storage such as the SD card and add a corresponding permission to the Android manifest. Enabled by default for development builds.
Sustained Performance Mode Set a predictable and consistent level of device performance over longer periods of time, without thermal throttling. Overall, performance might be lower when this setting is enabled. Based on the Android Sustained Performance API.
Android TV Compatibility Check this box to mark the application as Android TV compatible.
Android Game Android TV - Check this box to mark the output package (APK) will as a game rather than a regular application.
Android Gamepad Support Level Android TV - This option allows you to define the level of support your application offers for a gamepad. The options are Works with D-Pad, Supports Gamepad and Requires Gamepad.
Scripting Define Symbols 自定义的编译标志(请参阅平台相关的编译页面以了解详细信息)。

Optimization

The Optimization section of the Android PlayerSettings window
The Optimization section of the Android PlayerSettings window
Property: Function:
Prebake Collision Meshes Check this box to add collision data to meshes at build time.
Keep Loaded Shaders Alive Check this box to prevent shaders from being unloaded.
Preloaded Assets An array of assets to be loaded when the application starts up.
Stripping Level Options to strip out scripting features to reduce the output package (APK) size (This setting is shared between iOS and Android platforms, and is available with the Mono scripting backend only.)
Disabled No reduction is done.
Strip Assemblies Level 1 size reduction.
Strip ByteCode (iOS only) Level 2 size reduction (includes reductions from Level 1).
Use micro mscorlib Level 3 size reduction (includes reductions from Levels 1 and 2).
Strip Engine Code Enable code stripping. (This setting is only available with the IL2CPP scripting backend.)
Enable Internal profiler Check this box if you want to get the profiler data from your device in the Android SDK’s adblogcat output while testing your projects (only available in development builds).
Vertex Compression Select which vertex channels should be compressed. Compression can save memory and bandwidth but precision will be lower.
Optimize Mesh Data Remove any data from meshes that is not required by the material applied to them (tangents, normals, colors, UV).
Logging Enable different logging types (see the StackTraceLogType page for details).

API Compatibility Level

You can choose your Mono API compatibility level for all targets. Sometimes a 3rd party .NET DLL uses the APIs that are not included into the .NET compatibility level you would like to use. In order to investigate such cases, get a reflection tool like ILSpy on Windows, and check the dependencies of the DLLs.

Publishing Settings

属性: 功能:
Keystore
Use Existing Keystore / Create New Keystore Use this to choose whether to create a new Keystore or use an existing one. You can use the Browse Keystore button to select a Keystore from the filesystem.
Keystore password Create a password for the Keystore.
Confirm password Enter the same password you did in Keystore password (only enabled if the Create New Keystore option is selected).
Alias Key alias.
Password Password for key alias.
Split Application Binary Enable this option to split your output package into main (APK) and expansion (OBB) packages. This is required to publish applications larger than 100 MBytes to Goolge Play Store.

Note that for security reasons, Unity does not save the Keystore password or the Key password. Also, note that the signing must be done from Unity’s Playersettings, jarsigner does not work. The unsigned debug keystore is located by default at ~/.android/debug.keystore on MacOS and %USERPROFILE%.android\debug.keystore on Windows.

XR settings

属性: 功能:
XR Settings
Virtual Reality Supported 为 Unity Editor 和游戏版本启用本机 VR 支持。
ARCore Enable use of Google’s ARCore platform.
XR Support Installers
Vuforia Augmented Reality Supported 启用 Vuforia 软件开发工具包。必须拥有 Vuforia 软件许可证,并在启用该属性之前同意该许可证的条款。

详细信息

Bundle Identifier

The Bundle Identifier string is the unique name of your application when published to Google Play Store and installed on the device. The basic structure of the identifier is com.CompanyName.GameName, and can be chosen arbitrarily. In Unity this field is shared with the iOS Player Settings for convenience.

Stripping Level

Most games don’t use all the functionality of the DLLs included by default. With this option, you can strip out unused parts to reduce the size of the output package (APK).


  • 2018–06–06 页面已修订并只进行了有限的编辑审查

  • 5.5 版中的更新功能

  • 在 2017.3 版中添加了 Sustained Performance Mode 属性

  • 在 2018.1 版中添加了 .NET 4.x 运行时

  • 在 2018.2 版中添加了 Android Multiple APK 功能

Android 单通道立体渲染
Android 2D 纹理覆盖
Copyright © 2023 Unity Technologies
优美缔软件(上海)有限公司 版权所有
"Unity"、Unity 徽标及其他 Unity 商标是 Unity Technologies 或其附属机构在美国及其他地区的商标或注册商标。其他名称或品牌是其各自所有者的商标。
公安部备案号:
31010902002961