---
title: "setUniformTransform(_:)"
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(_:)"
---

# setUniformTransform(_:)

Registers a closure that transforms a uniform value of type V on a per-entity basis.

## Declaration

```swift
func setUniformTransform<V>(_ transform: @escaping (V, Entity) -> V) where V : BitwiseCopyable
```

## Parameters

- `transform`: A closure (V, Entity) -> V.

## Discussion

Discussion The closure receives the current value and the entity being evaluated, and returns the transformed value. This lets you derive per-entity variants of a global uniform at simulation time, for example, converting a position from the scene’s coordinate system to the system’s coordinate system.
