---
title: "withUnsafeBytes(_:)"
framework: realitykit
role: symbol
role_heading: Instance Method
path: "realitykit/lowlevelbuffer/withunsafebytes(_:)"
---

# withUnsafeBytes(_:)

Read the buffer synchronously on the CPU. The buffer provided is only valid for the lifetime of the callback.

## Declaration

```swift
final func withUnsafeBytes(_ callback: (UnsafeRawBufferPointer) -> Void)
```
