---
title: GetComponentData<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/gameobject/getcomponentdata
latest_url: https://docs.unity.com/en-us/engine/7000.0/script-reference/unityengine/gameobject/getcomponentdata.md
last_updated: 2026-12-01
generated_at: 2026-12-01T07:18:36.432Z
locale: en-us
---

# GetComponentData<T>()

> Gets the value of the ComponentData T, an IComponentData, on this GameObject.

## 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 T GetComponentData<T>() where T : unmanaged, IComponentData
```

### Returns

| Type | Description          |
| ---- | -------------------- |
| T    | A copy of the value. |

### Remarks

Throws an `ArgumentException` if the GameObject has been destroyed or doesn't have the ComponentData.

Waits for the jobs that write `T` to complete. To avoid the wait, read `T` in a job through a `Unity.Entities.ComponentLookup`. The job then runs after the jobs that write `T`, instead of the main thread waiting for them.
