<!--
{
  "availability" : [
    "Reality Composer Pro: -",
    "iOS: 27.0.0 -",
    "iPadOS: 27.0.0 -",
    "macCatalyst: 27.0.0 -",
    "macOS: 27.0.0 -",
    "tvOS: 27.0.0 -",
    "visionOS: 27.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "ComputeGraph",
  "identifier" : "/documentation/ComputeGraph/ComputeGraphSimulation/modifyUniforms(_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Compute Graph",
      "ComputeGraph"
    ],
    "preciseIdentifier" : "s:12ComputeGraph0aB10SimulationC14modifyUniformsyq_q_SwxYKXExYKs5ErrorRzRi__r0_lF"
  },
  "title" : "modifyUniforms(_:)"
}
-->

# modifyUniforms(_:)

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

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

## Discussion

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

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)