# GetSingletonBuffer<T>(bool)

> Gets the value of a singleton buffer component.

## Definition

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

> **Warning:**
>
> **Deprecated.** Use SystemAPI.GetSingletonBuffer instead (RemovedAfter Entities 1.0)

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

### Parameters

**** (\[bool]\(https\://learn.microsoft.com/dotnet/api/system.boolean)): True if the caller only requires read-only access to this data.

### Returns

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

### Remarks

Additional Resources: [EntityQuery.GetSingleton](/engine/7000.0/script-reference/unity/entities/entityquery/getsingleton.md)
