Thanks for being a part of WWDC25!

How did we do? We’d love to know your thoughts on this year’s conference. Take the survey here

RealityView camera feed not shown

I have two RealityView: ParentView and When click the button in ParentView, ChildView will be shown as full screen cover, but the camera feed in ChildView will not be shown, only black screen.

If I show ChildView directly, it works with camera feed.

Please help me on this issue? Thanks.

import RealityKit
import SwiftUI

struct ParentView: View{
   @State private var showIt = false
    var body: some View{
            ZStack{
                RealityView{content in
                     content.camera = .virtual
                    let box = ModelEntity(mesh: MeshResource.generateSphere(radius: 0.2),materials: [createSimpleMaterial(color: .red)])
                    content.add(box)

                    
                }
                Button("Click here"){
                    showIt = true
                }
            }
            .fullScreenCover(isPresented: $showIt){
                
                ChildView()
                
                    .overlay(
                        Button("Close"){
                            showIt = false
                        }.padding(20),
                        alignment: .bottomLeading
                    )
            }
        .ignoresSafeArea(.all)
    }
}
import ARKit
import RealityKit
import SwiftUI
struct ChildView: View{
    var body: some View{
         RealityView{content in 
              content.camera = .spatialTracking
         }

    }
}
RealityView camera feed not shown
 
 
Q