Version: 2023.1
언어: 한국어
Dedicated Server requirements
Dedicated Server optimizations

Dedicated Server Player settings

The Player settings for the Dedicated Server Player are a subset of the Desktop target Player settings. For a description of the general Player settings, refer to Player Settings.

Dedicated Server Player settings
Dedicated Server Player settings

Due to the headless and server application nature of the Dedicated Server, only the options in the Other Settings section are applicable. You can find documentation for the same in the Other Settings section:

The following options don’t apply:

  • 아이콘
  • Resolution and Presentation
  • 스플래시 이미지
  • Publishing Settings

기타 설정

이 섹션에서는 다음 그룹으로 분류된 다양한 옵션을 커스터마이즈할 수 있습니다.

설정

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 Mono.
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 IL2CPP.
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. For more information, refer to Referencing additional class library assemblies.
.Net Standard 2.1 Produces smaller builds and has full cross-platform support.
Editor Assemblies Compatibility Level Select which .NET APIs to use in your Editor assemblies.
.NET Framework Compatible with the .NET Framework 4 (which includes everything in the .NET Standard 2.1 profile plus additional APIs). Choose this option when using libraries that access APIs not included in .NET Standard 2.1. Produces larger builds and any additional APIs available aren’t necessarily supported on all platforms. For more information, refer to Referencing additional class library assemblies.
.NET Standard Compatible with .NET Standard 2.1. Produces smaller builds and has full cross-platform support.
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.
C++ Compiler Configuration Choose the C++ compiler configuration used when compiling IL2CPP generated code.
Debug Debug configuration turns off all optimizations, which makes the code quicker to build but slower to run.
Release Release configuration enables optimizations, so the compiled code runs faster and the binary size is smaller but it takes longer to compile.
Master Master configuration enables all possible optimizations, squeezing every bit of performance possible. For instance, on platforms that use the MSVC++ compiler, this option enables link-time code generation. Compiling code using this configuration can take significantly longer than it does using the Release configuration. Unity recommends building the shipping version of your game using the Master configuration if the increase in build time is acceptable.
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.
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.
Target minimum macOS version Specifies the minimum supported macOS version which is 10.13.0

API 호환성 레벨

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. Windows용 ILSpy를 설치합니다.
  2. 문제가 있는 API 호환성 수준의 .NET 어셈블리를 ILSpy로 드래그합니다. .NET 어셈블리는 Frameworks/Mono/lib/mono/YOURSUBSET/에 있습니다.
  3. 서드파티 어셈블리를 드래그합니다.
  4. 서드파티 어셈블리를 마우스 오른쪽 버튼으로 클릭하고 Analyze를 선택합니다.
  5. In the analysis report, inspect the Depends on section. The report highlights anything that the third-party assembly depends on, but that’s not available in the .NET compatibility level of your choice in red.

Shader Settings

프로퍼티 설명
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.

Shader Variant Loading Settings

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. 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.

스크립트 컴파일

프로퍼티 설명
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.

최적화(Optimization)



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.

Stack Trace

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.

Capture Logs

Activate the Capture Startup Logs option to capture the startup logs for later processing.

추가 리소스

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