How to switch between OVRManagers' between async scene transition?

Hello everybody,

I’m developing a VR game in our studio, and one of the issues I’ve experienced is when loading a new scene the players’ controller is not responding.

The component responsible for controllers input is OVRManager.cs on the OVRCameraRig.

this component is a singleton. In case I have two OVRCameraRigs in my scene, one will automatically get destroyed.

Now the issue:
I use LoadSceneAsync in my game, using the “additive” mode. This means that the next scene is loaded “on top” of the current scene and the current scene is “unloaded async” once the new scene is fully loaded.

During this process, the OVRManager.cs on the next scene is deleted because at this point in time there are two OVRManager.cs in the game.

  • my solution was to find the current OVRManager.cs in the game and destroy it once button pressed to load next scene. but it’s not always working.

What other approach should I consider?

This is how I have solved it.
Have a GameManager script that is singleton (and ‘Do not destroy’) that controls the game state machine, and scene transitions.
Also have a CameraController script, and attach both to a CameraHolder object in the Inspector. Add the OVRManager component to CameraHolder. See image showing this at runtime.

Now you will have only one camera that lives between scenes one OVRManager and one overseeing GameManager. The same idea will work for steamvr as well.