# RemoveComponent

> Removes a component of type T from a given build profile.

## Definition

* **Type:** Method
* **Namespace:** [UnityEditor.Build.Profile](/engine/6000.5/script-reference/unityeditor/build/profile.md)
* **Assembly:** UnityEditor.CoreModule

## RemoveComponent\<T>()

Removes a component of type `T` from a given build profile.

```csharp
public void RemoveComponent<T>() where T : Object
```

### Remarks

**Note**: This function is restricted to [ScriptableObject](/engine/6000.5/script-reference/unityengine/scriptableobject.md) types and cannot be used for all settings visible in the **Build Profiles** window. To remove built-in settings such as [PlayerSettings](/engine/6000.5/script-reference/unityeditor/playersettings.md), [GraphicsSettings](/engine/6000.5/script-reference/unityengine/rendering/graphicssettings.md), and [QualitySettings](/engine/6000.5/script-reference/unityengine/qualitysettings.md), use the **Build Profiles** window.

## RemoveComponent\<T>(T)

Removes a component of type `T` from a given build profile.

```csharp
public void RemoveComponent<T>(T objectToRemove) where T : Object
```

### Parameters

**** (T): Specific instance to remove. Must already be part of the current profile.

### Remarks

**Note**: This function is restricted to [ScriptableObject](/engine/6000.5/script-reference/unityengine/scriptableobject.md) types and cannot be used for all settings visible in the **Build Profiles** window. To remove built-in settings such as [PlayerSettings](/engine/6000.5/script-reference/unityeditor/playersettings.md), [GraphicsSettings](/engine/6000.5/script-reference/unityengine/rendering/graphicssettings.md), and [QualitySettings](/engine/6000.5/script-reference/unityengine/qualitysettings.md), use the **Build Profiles** window.
