cameras on different scenes — Oculus
Welcome to the Oculus Developer Forums!

Your participation on the forum is subject to the Oculus Code of Conduct.

In general, please be respectful and kind. If you violate the Oculus Code of Conduct, your access to the developer forums may be revoked at the discretion of Oculus staff.

cameras on different scenes

creat326creat326 Posts: 84
edited June 2015 in Oculus Go Development
Hi

I have two different scenes in my game. One is the main menu with a OVRCameraRig #1 that works just fine.

The second scene, is the actual game. it is loaded additively to the first one and it also has a OVRCameraRig #2 on it.

When I load this second scene, the first thing I do is disable the #1 OVRCameraRig gameobject since it has different settings for layers and far distance and all that.

The problem is that when you load the second scene, things get nasty on the Gear VR (sometimes just freezes the game). Why? Well, it seems that since both have a OVRManager, it creates a problem.

Looking at the code, OVRManager allows for only one instance of it. So the problem is that when I load the second scene, internally it is still pointing to the old OVRManager but its gameobject was disabled.
If I don't disable it, then it takes the info from the #1 stuff and ignores the #2 and things begin to look messy, I believe it's getting rendered 4 times (2 per camera and 2 OVRcameraRigs)


In short, how can I load additively a new scene which also contains a OVRCameraRig, disable the first one and enable this second one without getting OVRManager into a mess?

Comments

Sign In or Register to comment.