# GetComponentLookup<T>(bool)

> Gets a dictionary-like container containing all components of type T, keyed by Entity.

## Definition

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

```csharp
public static ComponentLookup<T> GetComponentLookup<T>(bool isReadOnly = false) where T : unmanaged, IComponentData
```

### Parameters

**** (\[bool]\(https\://learn.microsoft.com/dotnet/api/system.boolean)): Whether the data is only read, not written. Access data as read-only whenever possible.

### Returns

| Type                                                                                      | Description                   |
| ----------------------------------------------------------------------------------------- | ----------------------------- |
| [ComponentLookup\<T>](/engine/7000.0/script-reference/unity/entities/componentlookup1.md) | All component data of type T. |

### Remarks

When you call this method this method gets replaced direct access to a cached [ComponentLookup\<T>](/engine/7000.0/script-reference/unity/entities/componentlookup1.md).

Not working in IJobEntity, and Utility methods
