# SetSharedComponentForEntityQuery<T>(EntityQuery, T)

> Obsolete. Use EntityCommandBuffer.SetSharedComponent instead.

## Definition

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

> **Warning:**
>
> **Deprecated.** Use SetSharedComponent (RemovedAfter Entities 1.0)
>
> **Upgrade to** [EntityCommandBuffer.SetSharedComponent](/engine/7000.0/script-reference/unity/entities/entitycommandbuffer/setsharedcomponent.md)

```csharp
public void SetSharedComponentForEntityQuery<T>(EntityQuery entityQuery, T component) where T : unmanaged, ISharedComponentData
```

### Parameters

**** (\[EntityQuery]\(/engine/7000.0/script-reference/unity/entities/entityquery)): The query specifying which entities to add the component value to.**** (T): The component value to add.
