Asset flickering when switching ImmersiveSpaces

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:

  1. Create a new visionOS app using Xcode template, see image.
  2. Configure the project to launch directly into an immersive space (set Preferred Default Scene Session Role to Immersive Space Application Session Role in Info.plist), see image.
  3. Replace all swift files with those you will find in the attached texts.
  4. In the RealityKitContent package, create a scene named YellowSpheres as illustrated below.
  5. In the RealityKitContent package, create a scene named RedSpheres as illustrated below.
  6. Launch the app in debug mode via Xcode and onto the AVP device or simulator
  7. Continuously switch immersive spaces by pressing on buttons Show RedSpheres and Show YellowSpheres.
  8. Observe the 3d assets flicker upon opening of the immersive spaces.

FB15437352

Asset flickering when switching ImmersiveSpaces
 
 
Q