Handtracking button press fails wen returning to start scene. Nullreference in PlaneSurface
I am working on an application that uses handtracking in combination with buttons. I am using the OculusInteractionSampleRig in combination with my own version of the BigRedButton (but the problem also occurs when I use the BigRedButton itself), as shown in this video:
https://www.youtube.com/watch?v=BYS2NN1bWS4&ab_channel=DilmerValecillos
The application consists of a selection scene and a couple of functional scenes. After finishing one of the functional scenes the user returns to the selection scene.
When I start the application everything work fine. My hands are tracked and I can 'click' the buttons by pressing them with my hand. The functional scene also works fine. But when I return to the selection scene the hands are still tracked, but the button interaction does not work anymore. In the Android Logcat window I see a lot of nullreference exceptions:
The errors appear right away when the scene is loaded, without me even touching one of the buttons. It seems to be related to the Surface component. Occasionally (once per approximately 5 testruns) there are no errors the first time I return to the selection scene. I can select a functional scene for the second time. But after I get back from that second functional scene the errors are back again and button preses no longer work.
Is this a bug? Am I doing something wrong? It feels like it may be a timing/script execution order issue, but it is in the Oculus scripts, so I can't fix it myself.
Unity 2021.3.24f1
Oculus Integration package v54
Thanks