I’m using the “XR Origin (XR Rig)” prefab from the Unity 6 sample VR project in my VR app.
My app consists of a “Main Menu” scene, “Game” scene, and a “360-degree Video” scene. I am using the “DontDestroyOnLoad” method of keeping the XR Origin (XR Rig) persisting between scenes and scene loads.
This all works fine and dandy… except for the fact that when I “click” (Select/trigger) a UI Button in the “Main Menu” to enter the game world, or “click” an XR Interactable in the game world to show a 360-degree video, that my NearFarInteractor “remembers” the object that was clicked via the trigger button in the previous scene. You can see evidence of this as the “NearFarInteractor” ray/lasso hangs onto the last object indefinitely.
I’ve spent 4 days trying to somehow manually drop the last object, and I absolutely cannot figure it out. I’ve tried getting the 2 NearFarInteractor game objects and disable/re-enabling them (only to get an error about them not being registered), overriding the NearFarInteractor class to call the OnSelectExiting method manually… nothing works.
I have to be missing something. This seems like it should be easy. Please help me de-select the last object that was clicked!