---
title: "setUniformTransform(type:transform:)"
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/computegraphshareduniforms/setuniformtransform(type:transform:)"
---

# setUniformTransform(type:transform:)

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

## Declaration

```swift
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

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