I’m attempting to extend the abstract class for XRBaseInteractor, using XRBaseControllerInteractor as a template and the guidance in the documentation: XR Interaction Toolkit | XR Interaction Toolkit | 0.9.4-preview.
I’ve almost made it through, but am having trouble calling OnActivate() on an XRBaseInteractable from within my new Interactor class, since the OnActivate function is marked as internal. My understanding is that means that activating Interactables is not possible outside of the XR Interaction Toolkit assembly.
// This code is from XRBaseControllerInteractor.cs in the ProcessInteractor() function.
// Where selectTarget is an XRBaseInteractable, declared in XRBaseInteractor.cs
if (selectTarget && m_Controller.activateInteractionState.activatedThisFrame)
selectTarget.OnActivate(this);
if (selectTarget && m_Controller.activateInteractionState.deActivatedThisFrame)
selectTarget.OnDeactivate(this);
The error I get is ‘XRBaseInteractable.OnActivate(XRBaseInteractor)’ is not accessible due to its protection level. Does that mean it’s not possible to extend the Interactors such that they can call on the Interactables? I assume I’m missing/misunderstanding something.
Thanks for any help and clarification!