# GetOptionalEnabledRefRO<T>(int)

> Get a EnabledRefRO<T> reference to the enabled bit at index.

## Definition

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

```csharp
public EnabledRefRO<T> GetOptionalEnabledRefRO<T>(int index) where T : unmanaged, IEnableableComponent
```

### Parameters

**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): The index to the enabled bit in the chunk.

### Returns

| Type                                                                                | Description                                                                                                                                                                                                                                                                           |
| ----------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [EnabledRefRO\<T>](/engine/7000.0/script-reference/unity/entities/enabledrefro1.md) | A read-only reference to the enabled bit for the component at the specified index or [EnabledRefRO\<T>.Null](/engine/7000.0/script-reference/unity/entities/enabledrefro1/null.md) if this [EnabledMask](/engine/7000.0/script-reference/unity/entities/enabledmask.md) is not valid. |
