Adding colliders to XRGrabInteractable during runtime doesn't work

If I add colliders to XRGrabInteractable in code (but not on awake) it appears to not register the colliders. They are not detected at all.

I have a need in my game to change which colliders are registered to an XRGrabInteractable at times. I was able to get it working by having all the potential colliders I might swap too in the colliders list set in the inspector before startup. If I do that, and then swap them in code (only to ones that were there on startup) then it works, but this sure seems like a bug. I should be able to just add any collider at any time and have it work right?

Hey @edwon ,

We have this task tracked in our backlog. Currently the easiest way to update the collider registration is to disable and re-enable the XRGrabInteractable, which will trigger the registration process anew.

ok will try diable and reenable of the XRGrabInteractable after changing colliders

XR Interaction Toolkit 2.4.3. Still reproduced.

Still an issue in XR Interaction Toolkit 3.0.0-pre.1.

Thank you for the workaround @VRDave_Unity disabling and re-enabling partially works, but it drops the XRGrabInteractable if it is grabbed (selected) at that time.

The system does not have to keep track of the colliders automatically. Manually calling something like XRInteractionManager.UpdateColliders(XRInteractable interactable) or even more explicit XRInteractionManager.ColliderAdded(XRInteractable interactable, Collider collider) and XRInteractionManager.ColliderRemoved(XRInteractable interactable, Collider collider) would be totally fine for me.