# SetManagedStrippingLevel

> Sets the managed code stripping level for specified build target.

## Definition

* **Type:** Method
* **Namespace:** [UnityEditor](/engine/6000.3/script-reference/unityeditor.md)
* **Assembly:** UnityEditor

## SetManagedStrippingLevel(BuildTargetGroup, ManagedStrippingLevel)

Sets the managed code stripping level for specified build target.

> **Warning:**
>
> **Deprecated.** Use SetManagedStrippingLevel(NamedBuildTarget buildTarget, ManagedStrippingLevel level) instead

```csharp
public static void SetManagedStrippingLevel(BuildTargetGroup targetGroup, ManagedStrippingLevel level)
```

### Parameters

**** (\[BuildTargetGroup]\(/engine/6000.3/script-reference/unityeditor/buildtargetgroup)): **** (\[ManagedStrippingLevel]\(/engine/6000.3/script-reference/unityeditor/managedstrippinglevel)): The desired managed code stripping level.

### Remarks

During the build process, Unity strips unused code from your project's managed and dynamically linked libraries. Stripping code results in a much smaller executable but can remove code you'd like to use.

The [ManagedStrippingLevel](/engine/6000.3/script-reference/unityeditor/managedstrippinglevel.md) Enum defines the options you can use to specify the rate at which Unity should remove unused code or to disable code stripping altogether.

Additional Resources: [PlayerSettings.GetManagedStrippingLevel](/engine/6000.3/script-reference/unityeditor/playersettings/getmanagedstrippinglevel.md), [Managed code stripping](/engine/6000.3/manual/scripting/compilation-and-code-reload/script-compilation/managed-code-stripping.md).

BuildTargetGroup is marked for deprecation in the future. Use [NamedBuildTarget](/engine/6000.3/script-reference/unityeditor/build/namedbuildtarget.md) instead.

## SetManagedStrippingLevel(NamedBuildTarget, ManagedStrippingLevel)

Sets the managed code stripping level for specified build target.

```csharp
public static void SetManagedStrippingLevel(NamedBuildTarget buildTarget, ManagedStrippingLevel level)
```

### Parameters

**** (\[NamedBuildTarget]\(/engine/6000.3/script-reference/unityeditor/build/namedbuildtarget)): The [NamedBuildTarget](/engine/6000.3/script-reference/unityeditor/build/namedbuildtarget.md).**** (\[ManagedStrippingLevel]\(/engine/6000.3/script-reference/unityeditor/managedstrippinglevel)): The desired managed code stripping level.

### Remarks

During the build process, Unity strips unused code from your project's managed and dynamically linked libraries. Stripping code results in a much smaller executable but can remove code you'd like to use.

The [ManagedStrippingLevel](/engine/6000.3/script-reference/unityeditor/managedstrippinglevel.md) Enum defines the options you can use to specify the rate at which Unity should remove unused code or to disable code stripping altogether.

Additional Resources: [PlayerSettings.GetManagedStrippingLevel](/engine/6000.3/script-reference/unityeditor/playersettings/getmanagedstrippinglevel.md), [Managed code stripping](/engine/6000.3/manual/scripting/compilation-and-code-reload/script-compilation/managed-code-stripping.md).

BuildTargetGroup is marked for deprecation in the future. Use [NamedBuildTarget](/engine/6000.3/script-reference/unityeditor/build/namedbuildtarget.md) instead.
