---
title: "modifyUniforms(_:)"
framework: Compute Graph
role: symbol
role_heading: Instance Method
platforms: [iOS 27.0+, iPadOS 27.0+, Mac Catalyst 27.0+, macOS 27.0+, tvOS 27.0+, visionOS 27.0+]
path: "computegraph/computegraphsimulation/modifyuniforms(_:)"
---

# modifyUniforms(_:)

Provides read/write access to the entire uniforms buffer for CPU access.

## Declaration

```swift
final func modifyUniforms<E, R>(_ body: (UnsafeMutableRawBufferPointer) throws(E) -> R) throws(E) -> R where E : Error, R : ~Copyable
```

## Discussion

Discussion ComputeGraph will upload the changes to the GPU before the next simulation.
