prepare(for:)
A method where you can prepare the metal device with initial setup work.
Declaration
nonisolated mutating func prepare(for device: any MTLDevice)Discussion
When you set or update the customPostProcessing property, RealityKit calls this method once, after it does its setup work, but before rendering the next frame.
Adding long-running tasks in this method may cause rendering hitches.