Version: 2022.3
Language : English
Linux
Linux Build Settings

Linux Player settings

Use the Linux Unity Player settings (menu: Edit > Project Settings > Player) to determine how Unity builds and displays your Linux application. For a description of the general Player settings, refer to Player SettingsSettings that let you set various player-specific options for the final game built by Unity. More info
See in Glossary
.

Linux Player settings
Linux Player settings

You can find documentation for the properties in the following sections:

Icon

Enable the Override for Windows, Mac, Linux setting to assign a custom icon for your desktop game. You can upload different sizes of the icon to fit each of the squares provided.

Resolution and Presentation

Use the Resolution and Presentation section to customize aspects of the screen’s appearance in Resolution and Standalone Player Options.

Resolution section

Use this section to customize the screen mode and default size.

Resolution section for the Desktop platforms
Resolution section for the Desktop platforms
Property Description
Fullscreen Mode Choose the full-screen mode. This defines the default window mode at startup.
Fullscreen Window Set your app window to the full-screen native display resolution, covering the whole screen. This mode is also known as borderless full-screen. Unity renders the app content at the resolution set by a script, or the native display resolution if none is set and scales it to fill the window. When scaling, Unity adds black bars to the rendered output to match the display aspect ratioThe relationship of an image’s proportional dimensions, such as its width and height.
See in Glossary
to prevent content stretching. This process is called letterboxing. The OS overlay UI(User Interface) Allows a user to interact with your application. Unity currently supports three UI systems. More info
See in Glossary
displays on top of the full-screen window (such as IME input windows). All platforms support this mode.
Exclusive Fullscreen (Windows only) Set your app to maintain sole full-screen use of a display. Unlike Fullscreen Window, this mode changes the OS resolution of the display to match the app’s chosen resolution. This option is only supported on Windows.
Maximized Window (Mac only) Set the app window to the operating system’s definition of maximized, which is typically a full-screen window with a hidden menu bar and dock on macOS. This option is only supported on macOS. Fullscreen Window is the default setting for other platforms.
Windowed Set your app to a standard, non-full-screen movable window, the size of which is dependent on the app resolution. In this mode, the window is resizable by default. Use the Resizable Window setting to disable this. All desktop platforms support this full-screen mode.
Default Is Native Resolution Enable this option to make the game use the default resolution used on the target machine. This option isn’t available if the Fullscreen Mode is set to Windowed.
Default Screen Width Set the default width of the game screen in pixelsThe smallest unit in a computer image. Pixel size depends on your screen resolution. Pixel lighting is calculated at every screen pixel. More info
See in Glossary
. This option is only available if the Fullscreen Mode is set to Windowed.
Default Screen Height Set the default height of the game screen in pixels. This option is only available if the Fullscreen Mode is set to Windowed.
Mac Retina Support Enable this option to enable support for high DPI (Retina) screens on a Mac. Unity enables this by default. This enhances Projects on a Retina display, but it’s somewhat resource-intensive when active.
Run In background Enable this option to have the game running in the background instead of pausing if the app loses focus.

Standalone Player Options

Use this section to specify the settings to customize the screen. For example, you can set options for users to resize the screen and specify the number of instances that can run concurrently.

Player Options for the Desktop platforms
Player Options for the Desktop platforms
Property Function
Capture Single Screen Enable this option to ensure desktop games in Fullscreen Mode don’t darken the secondary monitor in multi-monitor setups. This isn’t supported on macOS X.
Use Player Log Enable this option to write a log file with debugging information. Defaults to enabled.
Warning: If you plan to submit your application to the Mac App Store, leave this option disabled. For more information, refer to publishing to the Mac App Store.
Resizable Window Enable this option to allow resizing of the Player window.
Note: If you disable this option, your application can’t use the Windowed Fullscreen Mode.
Visible in Background Enable this option to display the application in the background if the Windowed Fullscreen Mode option is used (in Windows).
Allow Fullscreen Switch Enable this option to allow default OS full-screen key presses to toggle between full-screen and windowed modes.
Force Single Instance Enable this option to restrict desktop players to a single concurrent running instance.
Use DXGI flip model swap chain for D3D11 Use the flip model to ensure best performance for presenting your application. Every time a frame needs to be displayed, Unity makes a copy of the swap chain surface and blitsA shorthand term for “bit block transfer”. A blit operation is the process of transferring blocks of data from one place in memory to another.
See in Glossary
it to the screen buffer. This setting affects the D3D11 graphics API. Disable this option to fall back to the Windows 7-style BitBlt model. When run in Windowed (borderless) full-screen mode, Unity displays the application swap chain directly on the screen, which reduces input latency by one frame and eliminates desktop composition done by the Desktop Window Manager in the same way that exclusive full-screen does. This optimization is known as “Independent Flip.” For more information, refer to PlayerSettings.useFlipModelSwapchain.

Splash Image

Use the Virtual Reality Splash Image setting to select a custom splash image for Virtual RealityVirtual Reality (VR) immerses users in an artificial 3D world of realistic images and sounds, using a headset and motion tracking. More info
See in Glossary
displays. For common Splash Screen settings, visit the Splash Screen page.

Splash Image Player settings for Desktop platforms
Splash Image Player settings for Desktop platforms

Other Settings

This section allows you to customize a range of options organized into the following groups:

Rendering

Use these settings to customize how Unity renders your game for desktop (Windows, Mac, Linux) platforms.

Missing include: ../../../../artifacts/UserManual/localized_md/en/include-player-settings-rendering-color-space.md

Missing include: ../../../../artifacts/UserManual/localized_md/en/include-player-settings-rendering-static-batching.md

Missing include: ../../../../artifacts/UserManual/localized_md/en/include-player-settings-rendering-graphics-jobs.md

Missing include: ../../../../artifacts/UserManual/localized_md/en/include-player-settings-rendering-lightmap-encoding.md

Missing include: ../../../../artifacts/UserManual/localized_md/en/include-player-settings-rendering-hdr-cubemap-encoding.md

Missing include: ../../../../artifacts/UserManual/localized_md/en/include-player-settings-rendering-lightmap-streaming-enabled.md

Missing include: ../../../../artifacts/UserManual/localized_md/en/include-player-settings-rendering-streaming-priority.md

Missing include: ../../../../artifacts/UserManual/localized_md/en/include-player-settings-rendering-enable-frame-timing-stats.md

Missing include: ../../../../artifacts/UserManual/localized_md/en/include-player-settings-rendering-allow-hdr-display-output.md

Missing include: ../../../../artifacts/UserManual/localized_md/en/include-player-settings-rendering-use-hdr-display-output.md

Missing include: ../../../../artifacts/UserManual/localized_md/en/include-player-settings-rendering–360-stereo.md

Missing include: ../../../../artifacts/UserManual/localized_md/en/include-player-settings-rendering-load-store-action-debug-mode.md

Property Description
Auto Graphics API for Windows Enable this option to use the best Graphics API for the Windows machine the application runs on. Disable it to add and remove supported Graphics APIs.
Auto Graphics API for Mac Enable this option to use the best Graphics API for the macOS machine the application runs on. Disable it to add and remove supported Graphics APIs.
Auto Graphics API for Linux Enable this option to use the best Graphics API for the Linux machine the application runs on. Disable it to add and remove supported Graphics APIs.
color-gamut for Mac This setting doesn’t apply to Linux.
GPU Skinning Enable the use of shaders to calculate mesh skinning and blend shapes on the GPU.
Use display in HDR mode Activate HDR mode output when the application runs. This only works on displays that support this feature. If the display doesn’t support HDR mode, the game runs in standard mode.
Virtual Texturing (Experimental) Enable this option to reduce GPU memory usage and texture loading times if your Scene has many high resolution textures. For more information, refer to Virtual Texturing.

Note: The Unity Editor requires a restart for this setting to take effect.

Vulkan Settings

Property Description
SRGB Write Mode Enable this option to let the Graphics.SetSRGBWrite() renderer toggle the sRGB write mode during runtime. Use this to deactivate Linear-to-sRGB write color conversion.
Number of swapchain buffers Set this option to 2 for double-buffering, or 3 for triple-buffering to use with the Vulkan renderer. This setting might help with latency on some platforms, but usually you shouldn’t change this from the default value of 3. Double-buffering might have a negative impact on performance.
Acquire swapchain image late as possible Enable this to get the backbuffer after the frame renders to an offscreen staging image. Enabling this setting adds an extra blit when presenting the backbuffer. This setting, in combination with double-buffering, can improve performance. However, it also can cause performance issues as the additional blit uses extra bandwidth.
Recycle command buffers Enable this option to recycle CommandBuffers after Unity executes them.

Mac App Store Options

The properties in this section are only relevant to macOS. For more information, refer to macOS Player Settings.

Configuration

Property Description
Scripting Backend Choose the scripting backend you want to use. The scripting backend determines how Unity compiles and executes C# code in your Project.
Mono Compiles C# code into .NET Common Intermediate Language (CIL) and executes that CIL using a Common Language Runtime. For more information, refer to MonoA scripting backend used in Unity. More info
See in Glossary
.
IL2CPP Compiles C# code into CIL, converts the CIL to C++ and then compiles that C++ into native machine code, which executes directly at runtime. For more information, refer to IL2CPPA Unity-developed scripting back-end which you can use as an alternative to Mono when building projects for some platforms. More info
See in Glossary
.
API Compatibility Level Choose which .NET APIs you can use in your project. This setting can affect compatibility with third-party libraries. However, it has no effect on Editor-specific code (code in an Editor directory, or within an Editor-specific Assembly Definition).

Tip: If you are having problems with a third-party assembly, you can try the suggestion in the API Compatibility Level section below.
.Net Framework Compatible with the .NET Framework 4 (which includes everything in the .NET Standard 2.0 profile plus additional APIs). Choose this option when using libraries that access APIs not included in .NET Standard 2.0. Produces larger builds and any additional APIs available aren’t necessarily supported on all platforms. Refer to Referencing additional class library assemblies for more information.
.Net Standard 2.1 Produces smaller builds and has full cross-platform support.
IL2CPP Code Generation This setting doesn’t apply for Linux.
C++ Compiler Configuraion This setting doesn’t apply for Linux.
Use incremental GC Uses the incremental garbage collector, which spreads garbage collection over several frames to reduce garbage collection-related spikes in frame duration. For more information, refer to Automatic Memory Management.
Allow downloads over HTTP Indicates whether to allow downloading content over HTTP. The default option is Not allowed due to the recommended protocol being HTTPS, which is more secure.
Not Allowed Never allow downloads over HTTP.
Allowed in Development Builds Only allow downloads over HTTP in development builds.
Always Allowed Allow downloads over HTTP in development and release builds.
Active Input Handling Choose how to handle input from users.
Input Manager (Old) Use the default Input window.
Input System Package (New) Use the newer Input system. To try the new Input System, install the InputSystem package.
Both Use both systems side by side.

API Compatibility Level

You can choose your mono API compatibility level for all targets. Sometimes a third-party .NET library uses functionality that’s outside of your .NET compatibility level. To understand what’s going on in such cases, and how to best fix it, try following these suggestions:

  1. Install ILSpy for Windows.
  2. Drag the .NET assemblies for the API compatilibity level you are having issues with into ILSpy. You can find these under Frameworks/Mono/lib/mono/YOURSUBSET/.
  3. Drag in your 3rd-party assembly.
  4. Right-click your 3rd-party assembly and select Analyze.
  5. In the analysis report, inspect the Depends on section. The report highlights anything that the 3rd-party assembly depends on, but that’s not available in the .NET compatibility level of your choice in red.

Mac Configuration

This section is only relevant to macOS. For more information, refer to macOS Player Settings.

Shader Settings

Property Description
ShaderA program that runs on the GPU. More info
See in Glossary
Precision Model
Select the default precision of samplers and the definition of half used in shaders. Select Unified to set the default sampler precision to full precision, and to enable 16-bit floating point operations in shaders on macOS. For more information, refer to ShaderPrecisionModel.
Strict shader variant matching Use the error shader if a shader variant is missing and display an error in the console.
Keep Loaded Shaders Alive Keep all loaded shaders alive and prevent unloading.

Shader Variant Loading Settings

Use these settings to control how much memory shaders use at runtime.

Property Description
Default chunk size (MB) Sets the maximum size of compressed shader variant data chunks Unity stores in your built application for all platforms. The default is 16. For more information, refer to Shader loading.
Default chunk count Sets the default limit on how many decompressed chunks Unity keeps in memory on all platforms. The default is 0, which means there’s no limit.
Override Enables overriding Default chunk size and Default chunk count for this build target.
Chunk size (MB) Overrides the value of Default chunk size (MB) on this build target.
Chunk count Overrides the value of Default chunk count on this build target.

Script Compilation

Property Description
Scripting Define Symbols Sets custom compilation flags.

For more details, see Platform dependent compilation.
Additional Compiler Arguments Adds entries to this list to pass additional arguments to the Roslyn compiler. Use one new entry for each additional argument.
To create a new entry, click Add (+). To remove an entry, click Remove (-).

When you have added all desired arguments, click Apply to include your additional arguments in future compilations. Click Revert to reset this list to the most recent applied state.
Suppress Common Warnings Indicates whether to display the C# warnings CS0169 and CS0649.
Allow ‘unsafe’ Code Enables support for compiling ‘unsafe’ C# code in a pre-defined assembly (for example, Assembly-CSharp.dll).
For Assembly Definition Files (.asmdef), click on one of your .asmdef files and enable the option in the Inspector window that appears.
Use Deterministic Compilation Indicates whether to prevent compilation with the -deterministic C# flag. With this setting enabled, compiled assemblies are byte-for-byte identical each time they are compiled.

For more information, see Microsoft’s deterministic compiler option.

Optimization

Optimization settings for Desktop platforms
Optimization settings for Desktop platforms

Missing include: ../../../../artifacts/UserManual/localized_md/en/include-player-settings-optimization-prebake-collision-meshes.md

Missing include: ../../../../artifacts/UserManual/localized_md/en/include-player-settings-optimization-preloaded-assets.md

Missing include: ../../../../artifacts/UserManual/localized_md/en/include-player-settings-optimization-managed-stripping-level.md

Missing include: ../../../../artifacts/UserManual/localized_md/en/include-player-settings-optimization-vertex-compression.md

Missing include: ../../../../artifacts/UserManual/localized_md/en/include-player-settings-optimization-optimize-mesh-data.md

Missing include: ../../../../artifacts/UserManual/localized_md/en/include-player-settings-optimization-texture-mipmap-stripping.md

Property Description

Stack Trace

Select your preferred logging type by enabling the option that corresponds to each Log Type.

Property Description
None No logs are ever recorded.
ScriptOnly Logs only when running scriptsA piece of code that allows you to create your own Components, trigger game events, modify Component properties over time and respond to user input in any way you like. More info
See in Glossary
.
Full Logs all the time.

For more information, refer to stack trace logging.

Legacy

Property Function
Clamp BlendShapes (Deprecated) Enable this option to clamp the range of blend shape weights in SkinnedMeshRenderers.

Additional resources

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