Search Issue Tracker
By Design
Votes
0
Found in
5.3.4p6
Issue ID
799361
Regression
No
[VR] VRSettings.enabled cannot be set to true
Steps to reproduce:
1. Download and open attached project "Test.zip"
2. Make sure you have attached HMD and in Player Settings VR mode is off
3. Play scene "Main"
4. Note the console output
Actual result: VRSettings.enbled is set to true, but is not enabled (output message says that his variable is false and fact that HMD does not work)
Expected result: HMD and VR mode works as expected, after being enabled
Tested and reproduced on:
Unity 5.3.5p1, 5.4.0b19
Oculus CV1
OVR Runtime 1.4.0
---
The Player Settings box is "Virtual Reality Supported". If it's not checked, there is no way to enabled VR at runtime - no dependencies will be included for the VR in the build, unless it is checked.
If it is checked, then you can manage VRSettings.enabled withing runtime. Adding "None" device to the top of the list, and having the necessary devices below it will start the game in non-vr mode, achieving desired result.
Comments (4)
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Texture2D hash changes inside of an AssetBundle when rebuilding a SpriteAtlas bundle with an empty AssetPostprocessor Script enabled
- Aniso Level still applies when Generate MipMap is disabled in Texture Import Settings
- Mipmap Limit Groups long names are not truncated when creating a new Mipmap Limit Group with a long name
- “ArgumentException: Invalid double parameter.” error is thrown when Infinity is typed into the Fixed Timestep field
- GameObject becomes gray when using HDRP and STP together on macOS
vrhsolutions
May 29, 2017 14:10
In case anyone else lands here on the same issue - this silly thing worked for me:
private IEnumerator EnableVR()
{
UnityEngine.VR.VRSettings.enabled = true;
yield return new WaitForEndOfFrame();
UnityEngine.VR.VRSettings.LoadDeviceByName("cardboard");
yield return new WaitForEndOfFrame();
UnityEngine.VR.VRSettings.enabled = true;
}
vrhsolutions
May 29, 2017 10:35
Says here the issue is resolved - I would love to see that resolution, cause I'm having a bad headache over this...
HalversonS
May 08, 2017 15:05
Still occurs in 5.6.0f3.
AlexTuduran
Feb 19, 2017 18:38
In 5.5.0f3 doesn't seem to be resolved. to make it work, I have to enable, LoadDeviceByName, enable again, disable, enable, LoadDeviceByName, enable again, but at different timings.