c# – Unity: XR Interaction Toolkit: Best way to override XRRayInteractor from an interactable GameObject

I’m very new to C# and Unity. I’m adding some custom interactions to XR Interaction Toolkit, I’m trying to make it so when a user “grabs” a certain GameObject they can resize it with the thumbstick on the controller. However on other GameObjects using the thumbstick will rotate and move the object which is the default behavior when Anchor Control is turned on.

enter image description here

My first thought is override the Anchor Control method which appears to be called ProcessInteractor. But this is inside the XRRayInteractor script. Whereas because this functionality is specific to certain GameObjects I feel like I should be writing this code as part of XRGrabInteractable and placing it on the GameObject that’s interactable.

Am I correct in thinking this? And if so what’s the correct way to implement this, is it possible to override ProcessInteractor in XRRayInteractor from the GameObject that has the XRGrabInteractable on it without ending up with the entire XRRayInteractor attached to the GameObject? Can’t quite get my head around the best way to do this.