There is a flickering occurring on 3D assets when switching immersive spaces, which is not the nicest user experience. The flickering does occur either when loading the scenes directly from the RealityKitContent package, or from memory (pre-loaded assets).
Since we cannot upload a video illustrating the undesirable behaviour, I have to describe how to setup the project for you to observe it.
To replicate the issue, follow these steps:
- Create a new visionOS app using Xcode template, see image.
- Configure the project to launch directly into an immersive space (set
Preferred Default Scene Session Role
toImmersive Space Application Session Role
in Info.plist), see image. - Replace all swift files with those you will find in the attached texts.
- In the RealityKitContent package, create a scene named
YellowSpheres
as illustrated below. - In the RealityKitContent package, create a scene named
RedSpheres
as illustrated below. - Launch the app in debug mode via Xcode and onto the AVP device or simulator
- Continuously switch immersive spaces by pressing on buttons
Show RedSpheres
andShow YellowSpheres
. - Observe the 3d assets flicker upon opening of the immersive spaces.