# GetComponentDataRW

> Gets the value of a component for an entity associated with a system.

## Definition

* **Type:** Method
* **Namespace:** [Unity.Entities](/engine/7000.0/script-reference/unity/entities.md)
* **Assembly:** UnityEngine.EntitiesModule

## GetComponentDataRW\<T>(SystemHandle)

Gets the value of a component for an entity associated with a system.

```csharp
public RefRW<T> GetComponentDataRW<T>(SystemHandle system) where T : unmanaged, IComponentData
```

### Parameters

**** (\[SystemHandle]\(/engine/7000.0/script-reference/unity/entities/systemhandle)): The system handle.

### Returns

| Type                                                                  | Description                                                                                                                        |
| --------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- |
| [RefRW\<T>](/engine/7000.0/script-reference/unity/entities/refrw1.md) | A [RefRW\<T>](/engine/7000.0/script-reference/unity/entities/refrw1.md) struct of type T containing access to the component value. |

## GetComponentDataRW\<T>(Entity)

Gets the value of a component for an entity.

```csharp
public RefRW<T> GetComponentDataRW<T>(Entity entity) where T : unmanaged, IComponentData
```

### Parameters

**** (\[Entity]\(/engine/7000.0/script-reference/unity/entities/entity)): The entity.

### Returns

| Type                                                                  | Description                                                                                                                        |
| --------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- |
| [RefRW\<T>](/engine/7000.0/script-reference/unity/entities/refrw1.md) | A [RefRW\<T>](/engine/7000.0/script-reference/unity/entities/refrw1.md) struct of type T containing access to the component value. |
