---
title: GetBuffer<T>(Entity, bool)
product: Unity Editor
version: '7000.0'
latest_version: '7000.0'
status: This page documents version 7000.0. The latest version is 7000.0.
canonical: https://docs.unity.com/en-us/engine/7000.0/script-reference/unity/entities/globalentitymanager/getbuffer
latest_url: https://docs.unity.com/en-us/engine/7000.0/script-reference/unity/entities/globalentitymanager/getbuffer.md
last_updated: 2026-11-03
generated_at: 2026-11-04T10:46:40.784Z
locale: en-us
---

# GetBuffer<T>(Entity, bool)

> Gets the dynamic buffer of an entity.

## Definition

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

```csharp
public static DynamicBuffer<T> GetBuffer<T>(Entity entity, bool isReadOnly = false) where T : unmanaged, IBufferElementData
```

### Parameters

**** (\[Entity]\(/engine/7000.0/script-reference/unity/entities/entity)): The entity.**** (\[bool]\(https\://learn.microsoft.com/dotnet/api/system.boolean)): True if the buffer is only read, so writes to it aren't tracked as changes.

### Returns

| Type                                                                                  | Description |
| ------------------------------------------------------------------------------------- | ----------- |
| [DynamicBuffer\<T>](/engine/7000.0/script-reference/unity/entities/dynamicbuffer1.md) | The buffer. |
