# RemoveComponentForEntityQuery

> Obsolete. Use EntityCommandBuffer.RemoveComponent instead.

## Definition

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

## RemoveComponentForEntityQuery(EntityQuery, ComponentType)

Obsolete. Use [EntityCommandBuffer.RemoveComponent](/engine/7000.0/script-reference/unity/entities/entitycommandbuffer/removecomponent.md) instead.

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

```csharp
public void RemoveComponentForEntityQuery(EntityQuery entityQuery, ComponentType componentType)
```

### Parameters

**** (\[EntityQuery]\(/engine/7000.0/script-reference/unity/entities/entityquery)): The query specifying the entities from which the component is removed.**** (\[ComponentType]\(/engine/7000.0/script-reference/unity/entities/componenttype)): The types of component to remove.

## RemoveComponentForEntityQuery\<T>(EntityQuery)

Obsolete. Use [EntityCommandBuffer.RemoveComponent](/engine/7000.0/script-reference/unity/entities/entitycommandbuffer/removecomponent.md) instead.

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

```csharp
public void RemoveComponentForEntityQuery<T>(EntityQuery entityQuery)
```

### Parameters

**** (\[EntityQuery]\(/engine/7000.0/script-reference/unity/entities/entityquery)): The query specifying the entities from which the component is removed.

## RemoveComponentForEntityQuery(EntityQuery, ComponentTypeSet)

Obsolete. Use [EntityCommandBuffer.RemoveComponent](/engine/7000.0/script-reference/unity/entities/entitycommandbuffer/removecomponent.md) instead.

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

```csharp
public void RemoveComponentForEntityQuery(EntityQuery entityQuery, in ComponentTypeSet componentTypeSet)
```

### Parameters

**** (\[EntityQuery]\(/engine/7000.0/script-reference/unity/entities/entityquery)): The query specifying the entities from which the components are removed.**** (\[ComponentTypeSet]\(/engine/7000.0/script-reference/unity/entities/componenttypeset)): The types of components to remove.
