Version: 2022.3
LanguageEnglish
  • C#

ManagedStrippingLevel

enumeration

Suggest a change

Success!

Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.

Close

Submission failed

For some reason your suggested change could not be submitted. Please <a>try again</a> in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.

Close

Cancel

Description

Defines how aggressively Unity strips unused managed (C#) code.

When Unity builds your game or application it can strip unused code from the managed dynamically linked libraries used in the project. Stripping code can make the resulting executable significantly smaller, but can sometimes mistakenly remove code that is actually used. The ManagedStrippingLevel Enum defines the options you can use when specifying how aggressively Unity should remove unused code.

See Also: PlayerSettings.GetManagedStrippingLevel, PlayerSettings.SetManagedStrippingLevel

Properties

DisabledDo not strip any code.
LowRemove unreachable managed code to reduce build size and Mono/IL2CPP build times.
MediumRun UnityLinker in a less conservative mode than Low. This will further reduce code size beyond what Low can achieve. However, this additional reduction may come with tradeoffs. Possible side effects may include, having to maintain a custom link.xml file, and some reflection code paths may not behave the same.
HighUnityLinker will strip as much as possible. This will further reduce code size beyond what Medium can achieve. However, this additional reduction may come with tradeoffs. Possible side effects may include, managed code debugging of some methods may no longer work. You may need to maintain a custom link.xml file, and some reflection code paths may not behave the same.
MinimalThe class libraries, UnityEngine, and Windows Runtime assemblies will be stripped. All other assemblies are copied.
Copyright © 2023 Unity Technologies
优美缔软件(上海)有限公司 版权所有
"Unity"、Unity 徽标及其他 Unity 商标是 Unity Technologies 或其附属机构在美国及其他地区的商标或注册商标。其他名称或品牌是其各自所有者的商标。
公安部备案号:
31010902002961