Hi, in visionOS2, I wonder if there is a method to add/remove referenceObjects of ObjectTrackingProvider after ARSession started without stop it.
Now I must stop it and run it again. The current tracking is stopped.
Thanks.
So should I load all RefereneceObjects at the begining?
No. For performance reasons it makes sense to only load the reference objects that you know can be detected in the user's current room. So restarting the session with a new set of reference objects when entering a new room makes a lot of sense.
I would encourage you to test how disruptive this is to the end user experience - usually restarting the session should be a fast operation so in the best case users would not notice a short gap in hand tracking. If it is noticeable for users then you can split your providers to run on two ARKitSession
instances - one for hands & world tracking and a second session just for object tracking.