Type Safely

Type Safely

Share this post

Type Safely
Type Safely
Change RealityKit Materials With SwiftUI

Change RealityKit Materials With SwiftUI

Daily Coding Tip 039

Type Safely's avatar
Type Safely
Jan 30, 2021
∙ Paid

Share this post

Type Safely
Type Safely
Change RealityKit Materials With SwiftUI
Share
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…

Keep reading with a 7-day free trial

Subscribe to Type Safely to keep reading this post and get 7 days of free access to the full post archives.

Already a paid subscriber? Sign in
© 2025 Type Safely
Privacy ∙ Terms ∙ Collection notice
Start writingGet the app
Substack is the home for great culture

Share