The immersive environment example here: https://developer.apple.com/documentation/realitykit/construct-an-immersive-environment-for-visionos
uses onDisappear on the RealityView to detect when it is closed.
Topic:
Spatial Computing
SubTopic:
General
Tags: