- Home /
Question by
AubryStrawberry · Aug 06, 2015 at 05:19 PM ·
vrsettingsoculusrift
VR Support: Toggle Oculus On/Off
Is there a way to toggle the headset on and off in-game? I'm liking the ease of just enabling VR Support in player settings; however, I only want it for certain scenes and currently using VRSettings.enabled yields unpredictable results.
Please advise.
public static class VRManager
{
public static bool IsEnabled
{
get { return VRSettings.enabled; }
}
public static void ToggleOff()
{
if(IsEnabled)
VRSettings.enabled = false;
}
public static void ToogleOn()
{
if(!IsEnabled)
VRSettings.enabled = true;
}
}
Comment
VRSettings.enabled = !VRSettings.enabled;
works fine for me (5.1.2p3), what results you are getting?
Your answer
![](https://koobas.hobune.stream/wayback/20220611234709im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Is it possible for VRSettings.showDeviceView() to render the right eye instead of left? 0 Answers
Dropdown not working with Oculus 3 Answers
VR Headset Simulator 1 Answer
Virtual reality supported keeps disabling - Vive 1 Answer
,Does anyone know how to implement the touch controllers on a build made for Samsung Gear? 0 Answers