Immersive spaces
Display unbounded content in a person’s surroundings.
Overview
Use an immersive space in visionOS to present SwiftUI views outside of any containers. You can include any views in a space, although you typically use a RealityView to present RealityKit content.
[Image]
You can request one of three styles of spaces with the immersionStyle(selection:in:) scene modifier:
The mixed style blends your content with passthrough. This enables you to place virtual objects in a person’s surroundings.
The full style displays only your content, with passthrough turned off. This enables you to completely control the visual experience, like when you want to transport people to a new world.
The progressive style completely replaces passthrough in a portion of the display. You might use this style to keep people grounded in the real world while displaying a view into another world.
When you open an immersive space, the system continues to display all of your app’s windows, but hides windows from other apps. The system supports displaying only one space at a time across all apps, so your app can only open a space if one isn’t already open.
Topics
Creating an immersive space
ImmersiveSpaceImmersiveSpaceContentBuilderimmersionStyle(selection:in:)ImmersionStyleimmersiveSpaceDisplacementImmersiveEnvironmentBehaviorProgressiveImmersionAspectRatio