Hidden window/volume system overlays in Full Space

When I show a window while a sky sphere is shown, the handles to drag/close/resize the window are hidden. The colliders still work, so they are there, but only the visuals are hidden. I already know from another project, that this also happens to volumes.

They only appear once you get closer to the window or if the sky sphere gets removed.

Is this a known issue or is there a fix for that?

.persistentSystemOverlays(.visible)does not fix it

Xcode 16.3.0 Beta, visionOS 2.4

Hey @Tempuno,

This sounds like an issue with the geometry of your sky dome. I don't see this occurring with the Presenting an artist’s scene sample code or the Immersive Environment App template in Xcode. Could you use the SkyDome.usdz from either of those projects and try again?

Thanks,
Michael

You are right, for those two examples it also worked for me.

I tried both domes in my app:

The handles were still hidden. But I just found out if I use .immersionStyle(selection: .constant(.full), in: .full) with UIImmersionStyleFull for UISceneInitialImmersionStyle, it suddenly works. So it seems they are hidden with everything set to .mixed - but again, in the examples you mentioned, everything still works with .mixed as well.

The other project where I know, that this issues appears, is a Unity PolySpatial build.

I found a way how you can reproduce it, for a new project with "Immersive Environment App", you just have to set UIImmersionStyleFull for UISceneInitialImmersionStyle in the info.plist file. And in the app file you can use the following code, the only changes are that the immersion style gets changed to .mixed and that the window gets opened once the immersive space shows up. When you then move back in the simulator, the handles are hidden at some point:

import SwiftUI

@main
struct SkySphereTestApp: App {

    @State private var appModel = AppModel()
    @State private var avPlayerViewModel = AVPlayerViewModel()
    
    @Environment(\.openWindow) var openWindow

    var body: some Scene {
        WindowGroup(id: "Window") {
            if avPlayerViewModel.isPlaying {
                AVPlayerView(viewModel: avPlayerViewModel)
            } else {
                ContentView()
                    .environment(appModel)
            }
        }

        ImmersiveSpace(id: appModel.immersiveSpaceID) {
            ImmersiveView()
                .environment(appModel)
                .onAppear {
                    appModel.immersiveSpaceState = .open
                    avPlayerViewModel.play()
                    
                    openWindow(id: "Window")
                }
                .onDisappear {
                    appModel.immersiveSpaceState = .closed
                    avPlayerViewModel.reset()
                }
        }
        .immersionStyle(selection: .constant(.mixed), in: .mixed)
    }
}

For the Artists scene example you also have to change the info.plist settings and set the immersionStyle to .mixed. Then, in the ImmersiveView file just add a sphere that would act like a sky sphere

 RealityView { content in
            // Add the initial RealityKit content.
            if let immersiveContentEntity = try? await Entity(named: "ArtistWorkflowExample", in: realityKitContentBundle) {
                content.add(immersiveContentEntity)
            }
            
            var material = SimpleMaterial(color: .blue, isMetallic: false)
            material.faceCulling = .front
            let skybox = ModelEntity(mesh: .generateSphere(radius: 500),
                                     materials: [material])
            
            content.add(skybox)
        }

Hey @Tempuno,

Thanks for the additional information. That is very useful. Could you file a bug report to help me track down this issue?

Our engineering teams need to investigate this issue, as resolution may involve changes to Apple's software. I'd greatly appreciate it if you could open a bug report, include the steps to reproduce and a sample project of the issue, and post the FB number here once you do.

Bug Reporting: How and Why? has tips on creating your bug report.

Thanks,
Michael

Feedback submitted: FB16868904

Hidden window/volume system overlays in Full Space
 
 
Q