# GetUnsafeReadOnlyPtr()

> Gets an unsafe read-only pointer to the contents of the buffer.

## Definition

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

```csharp
public void* GetUnsafeReadOnlyPtr()
```

### Returns

| Type                                                         | Description                                                 |
| ------------------------------------------------------------ | ----------------------------------------------------------- |
| [void\*](https://learn.microsoft.com/dotnet/api/system.void) | A typed, unsafe pointer to the first element in the buffer. |

### Remarks

This function can only be called in unsafe code contexts.
