# IsComponentEnabled

> Checks whether the IComponentData of type T is enabled on the specified Entity. For the purposes of EntityQuery matching, an entity with a disabled component will behave as if it does not have that component. The type T must implement the IEnableableComponent interface.

## Definition

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

## IsComponentEnabled(Entity)

Checks whether the [IComponentData](/engine/7000.0/script-reference/unity/entities/icomponentdata.md) of type T is enabled on the specified [Entity](/engine/7000.0/script-reference/unity/entities/entity.md). For the purposes of EntityQuery matching, an entity with a disabled component will behave as if it does not have that component. The type T must implement the [IEnableableComponent](/engine/7000.0/script-reference/unity/entities/ienableablecomponent.md) interface.

```csharp
public bool IsComponentEnabled(Entity entity)
```

### Parameters

**** (\[Entity]\(/engine/7000.0/script-reference/unity/entities/entity)): The entity whose component should be checked.

### Returns

| Type                                                          | Description                                                             |
| ------------------------------------------------------------- | ----------------------------------------------------------------------- |
| [bool](https://learn.microsoft.com/dotnet/api/system.boolean) | True if the specified component is enabled, or false if it is disabled. |

### Remarks

Additional Resources: [ComponentLookup\<T>.SetComponentEnabled](/engine/7000.0/script-reference/unity/entities/componentlookup1/setcomponentenabled.md)

## IsComponentEnabled(SystemHandle)

Checks whether the [IComponentData](/engine/7000.0/script-reference/unity/entities/icomponentdata.md) of type T is enabled on the specified system using a [SystemHandle](/engine/7000.0/script-reference/unity/entities/systemhandle.md). For the purposes of EntityQuery matching, a system with a disabled component will behave as if it does not have that component. The type T must implement the [IEnableableComponent](/engine/7000.0/script-reference/unity/entities/ienableablecomponent.md) interface.

```csharp
public bool IsComponentEnabled(SystemHandle systemHandle)
```

### Parameters

**** (\[SystemHandle]\(/engine/7000.0/script-reference/unity/entities/systemhandle)): The system whose component should be checked.

### Returns

| Type                                                          | Description                                                             |
| ------------------------------------------------------------- | ----------------------------------------------------------------------- |
| [bool](https://learn.microsoft.com/dotnet/api/system.boolean) | True if the specified component is enabled, or false if it is disabled. |

### Remarks

Additional Resources: [ComponentLookup\<T>.SetComponentEnabled](/engine/7000.0/script-reference/unity/entities/componentlookup1/setcomponentenabled.md)
