Adding a material to a ModelEntity programmatically
The docs for RealityKit include the structs: OcclusionMaterial , SimpleMaterial , and UnlitMaterial for adding materials to a ModelEntity . Alternatively you can load in a model with a material attached to it. I want to add a custom material/texture to a ModelEntity programmatically. How can I achieve this on the fly without adding the material to a model in Reality Composer or some other 3D software? As you said, there are 3 types of materials in RealityKit at the moment: SimpleMaterial , UnlitMaterial and OcclusionMaterial . So you can try the following code using SimpleMaterial class: var