I've been trying to find a way to display UIViews as 3d objects in my ARView. I have been trying to create a sort-of a box which would act as a display to contain a UIView but with no luck.
This answer provides a solution for SceneKit, but the same does not seem to work in RealityKit. My idea so far was the following, but couldn't find a way to actually hook up a UIView.
let box = MeshResource.generateBox(width: 0.6, height: 0.3, depth: 0.02, cornerRadius: 0.03)
let material = SimpleMaterial()
material.baseColor = --SET UIVIEW AS DIFFUSE OF MATERIAL?--
let entity = ModelEntity(mesh: box, materials: [material])
anchorEntity.addChild(entity)