# SetChunkComponentData<T>(ArchetypeChunk, T)

> Sets the value of a chunk component.

## Definition

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

```csharp
public void SetChunkComponentData<T>(ArchetypeChunk chunk, T componentValue) where T : unmanaged, IComponentData
```

### Parameters

**** (\[ArchetypeChunk]\(/engine/7000.0/script-reference/unity/entities/archetypechunk)): The chunk to modify.**** (T): The component data to set.

### Remarks

A chunk component is common to all entities in a chunk. You can access a chunk [IComponentData](/engine/7000.0/script-reference/unity/entities/icomponentdata.md) instance through either the chunk itself or through an entity stored in that chunk.
