---
title: "writeBytes(_:count:)"
framework: scenekit
role: symbol
role_heading: Instance Method
path: "scenekit/scnbufferstream/writebytes(_:count:)"
---

# writeBytes(_:count:)

Copies the specified data bytes into the underlying Metal buffer for use by a shader.

## Declaration

```swift
func writeBytes(_ bytes: UnsafeRawPointer, count length: Int)
```

## Parameters

- `bytes`: The memory address from which to copy data.
- `length`: The number of bytes to copy into the Metal buffer.
