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.
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
- Articulation Body with 'Revolute' Joint Type has erratic behavior when Upper Limit is set to above 360
- WebGL Player fails to render Scene when Terrain with Detail Mesh is added and WebGPU Graphics API is used
- Inconsistent errors are logged when different types are passed into the Query "Q<>" method in UIToolkit and the ancestor VisualElement is null
- Crash on GetMaterialPropertyByIndex when opening a specific Scene
- Discrepancies in the styling are present when using a TSS file instead of a USS file in custom EditorWindow
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.