One Logo Pool Ball
RealityFoundation · IOS API REFERENCE

UnlitMaterial.Program

class · iOS 18.0+ · SDK 27.1

final class Program

An object that represents the backing shader compilation required for unlit materials. You can use this type to control when RealityKit compiles shaders, and to initialize `UnlitMaterial` objects with more predicitable loading performance. When initializing an `UnlitMaterial` this way, a `Program` object is created first asynchronously, which is used to cache the material's shader program so the `UnlitMaterial` can be loaded immediately later. For example: ```swift // Initialize descriptor with desired properties var descriptor = UnlitMaterial.Descriptor() descriptor.applyPostProcessToneMap = false // Create program object let program = await UnlitMaterial.Program(descriptor: descriptor) // Create material (returns immediately) let material = UnlitMaterial(program: program) ```

Members (2)

init · iOS 18.0+

init

TypeScript
static init(descriptor: UnlitMaterial_Program_Descriptor): Promise<UnlitMaterial_Program>
Swift declaration
init(descriptor: UnlitMaterial.Program.Descriptor) async
get · iOS 18.0+

descriptor

TypeScript
get descriptor(): UnlitMaterial_Program_Descriptor
Swift declaration
final let descriptor: UnlitMaterial.Program.Descriptor

Skipped declarations

No declarations were skipped in this snapshot.

All RealityFoundation types →