Contents

Entity.WriteOptions

A set of options that control how RealityKit writes entities to a reality file.

Declaration

struct WriteOptions

Overview

Use Entity.WriteOptions to tune the tradeoff between export speed, file size, and runtime cost when you save a scene to a .reality file.

Pass a value of this type to write(to:options:) or write(to:options:) as an array literal containing one or more option values.

let combinedOptions: Entity.WriteOptions = [
    .preferFastExport,
    .preferSmallTextureFiles(quality: .standard)
]

Expediting Reality File Exports

The preferFastExport reduces the time required to write a reality file but produces a larger file on disk.

Reducing Texture File Size

The preferSmallTextureFiles(quality:) method returns options that instruct RealityKit to encode textures using smaller file representations, at the cost of longer load times and higher memory usage. Specify a Entity.WriteOptions.TextureQuality level to control the tradeoff between visual fidelity and file size.

Topics

Configuring export options

See Also

Writing an entity to a file