Skip to main content
Inspiring
April 27, 2017

How to use VR over multiple scenes?

Scene 0: A menue in which VR support isn`t enabled.
Scene 1: The actual scene in which I want to use my CV1.

If I start scene 1 it works. If I start scene 0 and load scene 1 on button click, it doesn`t recognice the CV1 anymore.
Ofcourse I reactivate the VR support before I load scene 1 (It`s active I checked it). 

Worth mentioning:
Im using the OptiTrack Unity Plugin, to stream data from Motive to Unity. But since the Plugin can`t find an HMD, it throws an error ("No HMD device present").

Any suggestions?
This topic has been closed for replies.

3 replies

Inspiring
April 27, 2017
It's important to distinguish between PlayerSettings.virtualRealitySupported and VRSettings.enabled. "Supported" means VR is possible in any scene in your app, using any of the VR devices in VRSettings.supportedDevices (you can switch by calling VRSettings.LoadDeviceByName(..)). "Enabled" lets you toggle VR at runtime. For your app, you probably want to enable VR support in Player Settings and set VRSettings.enabled = false in one of your Awake methods in Scene 0. Note: VRSettings.enabled doesn't work on Gear VR just yet.
Fuby1000Author
Inspiring
April 27, 2017

Fuby1000 said:

Scene 0: A menue in which VR support isn`t enabled.
Scene 1: The actual scene in which I want to use my CV1.

If I start scene 1 it works. If I start scene 0 and load scene 1 on button click, it doesn`t recognice the CV1 anymore.
Ofcourse I reactivate the VR support before I load scene 1 (It`s active I checked it). 

Worth mentioning:
Im using the OptiTrack Unity Plugin, to stream data from Motive to Unity. But since the Plugin can`t find an HMD, it throws an error ("No HMD device present").

Any suggestions?Solved: You can`t use  VRSettings.enabled in Awake(). Use it in Start()

Inspiring
April 27, 2017
> You can`t use  VRSettings.enabled in Awake()

That sounds like a bug. We'll look into it.