# GetComponentDataFromEntity<T>(bool)

> Obsolete. Use ComponentSystemBase.GetComponentLookup instead.

## Definition

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

> **Warning:**
>
> **Deprecated.** This method has been renamed to GetComponentLookup. (RemovedAfter Entities 1.0)
>
> **Upgrade to** [ComponentSystemBase.GetComponentLookup](/engine/7000.0/script-reference/unity/entities/componentsystembase/getcomponentlookup.md)

```csharp
public ComponentLookup<T> GetComponentDataFromEntity<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

**Obsolete.** Use [ComponentSystemBase.GetComponentLookup](/engine/7000.0/script-reference/unity/entities/componentsystembase/getcomponentlookup.md) instead.

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