Post

Replies

Boosts

Views

Activity

Reply to Cannot pause and deallocate ARSession using SwiftUI and ARKit
Hi, I've found the solution. Practically I cannot use subViews or NavLink with an AR Environment inside, and that make sense. That's because if I start an AR session and then press the "back" button basically the session runs on the parent view not in the subView, so going back from child to parent doesn't stop the AR Session which is running in the parent view. The solution was quite simple, I've added a custom back button, and @Environment(.dismiss) to trigger in a fund updateUIView, so if triggered it will dismiss the scene and stop the AR Session.
Jul ’23