<!--
{
  "availability" : [
    "iOS: 27.0.0 -",
    "iPadOS: 27.0.0 -",
    "macOS: 27.0.0 -",
    "tvOS: 27.0.0 -",
    "visionOS: 27.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "RealityKit",
  "identifier" : "/documentation/RealityKit/ComputeGraphSharedUniforms/setUniformTransform(type:transform:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "RealityKit",
      "ComputeGraph",
      "_RealityKit_ComputeGraph"
    ],
    "preciseIdentifier" : "s:24_RealityKit_ComputeGraph0cD14SharedUniformsC19setUniformTransform4type9transformyxm_ys14MutableRawSpanVz_0A10Foundation6EntityCtcts15BitwiseCopyableRzlF"
  },
  "title" : "setUniformTransform(type:transform:)"
}
-->

# setUniformTransform(type:transform:)

Registers a raw-data transformer closure for a uniform of type `V`.

```
func setUniformTransform<V>(type: V.Type, transform: @escaping @_lifetime(0: copy 0) (inout MutableRawSpan, Entity) -> Void) where V : BitwiseCopyable
```

## Parameters

`type`

The `BitwiseCopyable` type the transformer operates on.

`transform`

A closure `(inout MutableRawSpan, Entity) -> Void`.

## Discussion

Use this overload when the transformation is most naturally expressed
over the raw byte representation of the value.

---

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)