---
title: "replaceUniforms(_:)"
framework: realitykit
role: symbol
role_heading: Instance Method
platforms: [iOS 27.0+, iPadOS 27.0+, macOS 27.0+, tvOS 27.0+, visionOS 27.0+]
path: "realitykit/computegraphcomponent/replaceuniforms(_:)"
---

# replaceUniforms(_:)

Replaces the entire uniform buffer with the given data.

## Declaration

```swift
mutating func replaceUniforms(_ data: Data)
```

## Parameters

- `data`: Raw bytes to write into the uniform buffer.

## Discussion

Discussion You can query pipelines.assembly.uniformBufferSize for the required size. If too few bytes are provided, the remaining bytes retain their previous values.
