---
title: RemoveComponentData<T>()
product: Unity Editor
version: '7000.0'
latest_version: '7000.0'
status: This page documents version 7000.0. The latest version is 7000.0.
canonical: https://docs.unity.com/en-us/engine/7000.0/script-reference/unityengine/component/removecomponentdata
latest_url: https://docs.unity.com/en-us/engine/7000.0/script-reference/unityengine/component/removecomponentdata.md
last_updated: 2026-12-01
generated_at: 2026-12-01T07:02:32.727Z
locale: en-us
---

# RemoveComponentData<T>()

> Removes the ComponentData T, an IComponentData, from the GameObject this Component is attached to.

## Definition

* **Type:** Method
* **Namespace:** [UnityEngine](/engine/7000.0/script-reference/unityengine.md)
* **Assembly:** [UnityEngine.CoreModule](/engine/7000.0/script-reference/modules/unityengine-coremodule.md)

```csharp
public bool RemoveComponentData<T>() where T : unmanaged, IComponentData
```

### Returns

| Type                                                          | Description                                            |
| ------------------------------------------------------------- | ------------------------------------------------------ |
| [bool](https://learn.microsoft.com/dotnet/api/system.boolean) | False if the GameObject didn't have the ComponentData. |

### Remarks

Same as [GameObject.RemoveComponentData](/engine/7000.0/script-reference/unityengine/gameobject/removecomponentdata.md) on [Component.gameObject](/engine/7000.0/script-reference/unityengine/component/gameobject.md).

Throws an `ArgumentException` if the GameObject has been destroyed.

This is a structural change: it waits for all jobs in the World to complete. To make it from a job or a system without waiting, record it in a `Unity.Entities.EntityCommandBuffer` instead.
