How to Add Material to ModelEntity programatically in RealityKit?

Updated: January 26, 2023 RealityKit materials There are 6 types of materials in RealityKit 2.0 and RealityFoundation at the moment: SimpleMaterial UnlitMaterial OcclusionMaterial (read this post to find out how to setup SceneKit occlusion shader) VideoMaterial (look at this post to find out how to setup it) PhysicallyBasedMaterial CustomMaterial (Medium story) SwiftUI version Here I … Read more