# GetBufferFromEntity<T>(bool)

> Obsolete. Use ComponentSystemBase.GetBufferLookup 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 GetBufferLookup. (RemovedAfter Entities 1.0)
>
> **Upgrade to** [ComponentSystemBase.GetBufferLookup](/engine/7000.0/script-reference/unity/entities/componentsystembase/getbufferlookup.md)

```csharp
public BufferLookup<T> GetBufferFromEntity<T>(bool isReadOnly = false) where T : unmanaged, IBufferElementData
```

### Parameters

**** (\[bool]\(https\://learn.microsoft.com/dotnet/api/system.boolean)): Whether the buffer data is only read or is also written. Access data in a read-only fashion whenever possible.

### Returns

| Type                                                                                | Description                                                                                                                          |
| ----------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------ |
| [BufferLookup\<T>](/engine/7000.0/script-reference/unity/entities/bufferlookup1.md) | An array-like object that provides access to buffers, indexed by [Entity](/engine/7000.0/script-reference/unity/entities/entity.md). |

### Remarks

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

Gets a BufferFromEntity\\\<T\\> object that can access a [DynamicBuffer\<T>](/engine/7000.0/script-reference/unity/entities/dynamicbuffer1.md). Assign the returned object to a field of your Job struct so that you can access the contents of the buffer in a Job.

Additional Resources: [ComponentDataFromEntity\<T>](/engine/7000.0/script-reference/unity/entities/componentdatafromentity1.md)
