This prototype links a SwiftUI interface to a 3D TV mesh using RealityView in VisionOS.

  1. Attaches a SwiftUI view to a 3D mesh with RealityView.
  2. Sets up and positions a TV screen model in mixed reality.
  3. Adjusts size, position, and effects for proper alignment.

1. Create a new VisionOS project

Screenshot 2025-04-05 at 3.34.16 PM.png

  1. Inside RCP → Create a new scene called “TVScene”

  2. Bring in usdz to RCP. (Increase the scale, 1 1 1)

    1. Rename it to TVScreenModel, if needed

      Screenshot 2025-04-05 at 3.40.25 PM.png

  3. In swift, create a new view called “ImmersiveTVView”. If the model appears on the preview, then we have successfully located the model.

    Screenshot 2025-04-05 at 3.44.10 PM.png


import SwiftUI
import RealityKit
import RealityKitContent

struct ImmersiveTvView: View {
    var body: some View {
        RealityView { content in
            // Add the initial RealityKit content
            if let model = try? await Entity(named: "TVScene", in: realityKitContentBundle) {
                content.add(model)
                model.position = SIMD3(x: 0, y: 1.3, z: -1.0)
                content.add(model)

            }
        }
    }
}

#Preview(immersionStyle: .mixed) {
    ImmersiveTvView()
}