Stop tracking and remove detected planes

Hi all, I’m looking for a way to stop the AR tracking once I have placed my objects in the scene and also to remove from the screen the planes already detected.

I tried using UnityARSessionNativeInterface and ARKitWorldTrackingSessionConfiguration by disabling the plane detection and submitting the config changes to the session, that makes the application randomly crash and even stop working. Is there a different approach to do this.

Thanks.

Try the solution here: ARFoundation remove mesh visualizer and cancel touch tracking

keep a reference to your generate plane object, when you’re ready to stop, just disable that object, then do a find gameobject on all planes, using tags, and delete them.