Type Safely

Type Safely

Change RealityKit Materials With SwiftUI

Daily Coding Tip 039

Type Safely's avatar
Type Safely
Jan 30, 2021
∙ Paid
Source: Bernie AR

If you’re interested to know how to change materials like you can do in the Bernie AR app, it’s not as difficult as you might expect.

Every ModelEntity in RealityKit has a ModelComponent property. If it exists, as it is an optional and may be nil, this component contains both the mesh and the materials array. This is all we need to modif…

User's avatar

Continue reading this post for free, courtesy of Type Safely.

Or purchase a paid subscription.
© 2026 Type Safely · Privacy ∙ Terms ∙ Collection notice
Start your SubstackGet the app
Substack is the home for great culture