The Player settings for the Dedicated Server Player are a subset of the Desktop target Player settings. That said, due to its headless and server application nature, the following options don’t apply:
You can find documentation for the properties in the Other Settings section:
To customize the Dedicated Server Player settings:
此部分可以自定义一系列选项,这些选项分为以下几组:
Missing include: temp/localized_md/zh-cn/include-player-settings-configuration-scripting-backend.md
Missing include: temp/localized_md/zh-cn/include-player-settings-configuration-api-compatibility-level.md
Missing include: temp/localized_md/zh-cn/include-player-settings-configuration-editor-assemblies-compatibility-level.md
Missing include: temp/localized_md/zh-cn/include-player-settings-configuration-c++-compiler-configuration.md
Missing include: temp/localized_md/zh-cn/include-player-settings-configuration-use-incremental-gc.md
Missing include: temp/localized_md/zh-cn/include-player-settings-configuration-allow-downloads-over-http.md
Property | Description | |
---|---|---|
IL2CPP Code Generation | Defines how Unity manages IL2CPP code generation. This option is only available if you use the IL2CPP scripting backend. | |
Faster runtime | Generates code optimized for runtime performance. This setting is activated by default. | |
Faster (smaller) builds | Generates code optimized for build size and iteration. This setting generates less code and produces a smaller build, but can reduce runtime performance for generic code. Use this option when faster build times are important, such as when iterating on changes. | |
IL2CPP Stacktrace Information | Select the information to be included in a stack trace. For further details on the information types, refer to Managed stack traces with IL2CPP. | |
Method Name | Include each managed method in the stack trace. | |
Method Name, File Name, and Line Number | Include each managed method with file and line number information in the stack trace. Note: Using this option can increase both the build time and final size of the built program. | |
Target minimum macOS version | Specifies the minimum supported macOS version which is 10.13.0 |
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:
Frameworks/Mono/lib/mono/YOURSUBSET/
.属性 | 描述 | |
---|---|---|
Shader precision model | Select the default precision of samplers used in shaders. Refer to Shader data types and precision for more details. | |
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. |
Use these settings to control how much memory shaders use at runtime.
设置 | 描述 |
---|---|
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 . Refer to Shader loading for more information. |
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. |
属性 | 描述 |
---|---|
Scripting Define Symbols | Sets custom compilation flags. For more details, refer to 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 | Activate 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 activate the option in the Inspector window that appears. |
Use Deterministic Compilation | Indicates whether to prevent compilation with the -deterministic C# flag. With this setting active, compiled assemblies are byte-for-byte the same each time they’re compiled. For more information, refer to Microsoft’s deterministic compiler option. |
Property | Description | |
---|---|---|
Enable Dedicated Server optimizations | Activate this option to perform additional optimizations on the Dedicated Server build. | |
Prebake Collision Meshes | Adds collision data to Meshes at build time. | |
Preloaded Assets | Sets an array of Assets for the player to load on startup. To add new Assets, increase the value of the Size property and then set a reference to the Asset to load in the new Element box that appears. |
|
Managed Stripping Level | Chooses how aggressively Unity strips unused managed (C#) code. The options are Minimal, Low, Medium, and High. When Unity builds your app, the Unity Linker process can strip unused code from the managed DLLs your Project uses. Stripping code can make the resulting executable significantly smaller, but can sometimes accidentally remove code that’s in use. For more information about these options and bytecode stripping with IL2CPP, refer to ManagedStrippingLevel. |
|
Vertex Compression | Sets vertex compression per channel. This affects all the meshes in your project. Typically, Vertex Compression is used to reduce the size of mesh data in memory, reduce file size, and improve GPU performance. For more information on how to configure vertex compression and limitations of this setting, refe to Compressing mesh data. |
|
Optimize Mesh Data | Enable this option to strip unused vertex attributes from the mesh used in a build. This option reduces the amount of data in the mesh, which can help reduce build size, loading times, and runtime memory usage. Warning: If you have this setting enabled, you should remember to not change material or shader settings at runtime. Refer to PlayerSettings.stripUnusedMeshComponents for more information. |
|
Texture MipMap Stripping | Enables mipmap stripping for all platforms. This strips unused mipmaps from Textures at build time. Unity determines unused mipmaps by comparing the value of the mipmap against the Quality Settings for the current platform. If a mipmap value is excluded from every Quality Setting for the current platform, then Unity strips those mipmaps from the build at build time. If QualitySettings.masterTextureLimit is set to a mipmap value that has been stripped, Unity will set the value to the closest mipmap value that has not been stripped. |
Select your preferred logging type by enabling the option that corresponds to each Log Type.
属性 | 描述 |
---|---|
无 | No logs are ever recorded. |
ScriptOnly | Logs only when running scripts. |
Full | Logs all the time. |
Refer to stack trace logging for more information.
Activate the Clamp BlendShapes (Deprecated) option to clamp the range of blend shape weights in SkinnedMeshRenderers.
Activate the Capture Startup Logs option to capture the startup logs for later processing.