cancel
Showing results for 
Search instead for 
Did you mean: 

Cannot play in editor while developing for GearVR. (Failed to initialize libOVR CAPI Error:)

boblaublaw
Honored Guest
I am developing on a system which USED to have a Rift attached and the Oculus runtime installed.  However, I recently uninstalled the Oculus runtime and detached the Rift.

Now, when I try to work on my GearVR project in Unity, I find I am unable to press play in the editor. When I press play, a popup appears with the title "Failed to initialize LibOVR".  The popup body says "CAPI Error:" and nothing else.

I can build for my device and run it on the Gear just fine, however it is very inefficient to only be able to test by building to a device. How can I configure Unity/Oculus to not attempt to connect to an HMD which is not there?  Surely I do not require a Rift to develop for GearVR?

i am also seeing a warning which may or may not be related: 
VR rendering requires one of the following device types: (Direct3D11, Direct3D12). Your graphics device: OpenGLES3


26 REPLIES 26

boblaublaw
Honored Guest
It may also be worth mentioning that after Unity exits, Oculus Home starts up.

boblaublaw
Honored Guest
If I disable OVRCameraRig (with the OVRManager attached), add a default Unity camera and press play the behavior persists.

vrdaveb
Oculus Staff
Thanks for the logs, but I don't see a smoking gun in them. Does the issue persist if you make a new project, switch to the Android build target, go to Project Settings, enable VR support, add Oculus to the list of supported devices, and press play? On my machine, that gracefully renders a non-VR view of the scene on my main monitor. If I then install the Rift Runtime, restart Unity, and press Play again, it uses the Rift for VR.

boblaublaw
Honored Guest
I'm happy to do the test if it helps you diagnose this. (Stand by for results.) However, it isn't clear how that would help me finish this project?  Do I just bin this and start over?  I've been working on this since June 2015.

Note, there is no longer a Rift attached to this system - I am developing for GearVR.

boblaublaw
Honored Guest
When I start a fresh scene, change platform to Android, enable VR and select the Oculus support, I can hit Play and everything works without errors or exits.

I also added OVR 1.13 and tried it with the OVRCameraRig - everything is fine there as well.

Happy to do any other tests or collect any other information you can suggest.

vrdaveb
Oculus Staff
Thanks, that helps me narrow down the issue. It sounds like there is a small difference between the VR settings of your original project and the test project causing Unity to try to initialize LibOVR when you hit play. Are you using the latest copy of the Oculus Utilities?

boblaublaw
Honored Guest
Yes, I am on version 1.13 as of a few days ago.


vrdaveb
Oculus Staff
If you make a copy of the broken project and remove everything except an empty scene with a camera, does it work? Are there any differences in the project settings between the two projects?

boblaublaw
Honored Guest
OK, I was able to prune this down to a bare minimum project. An empty `Assets` directory and a `ProjectSettings` directory.  You can see the behavior on my system here: https://www.youtube.com/watch?v=uJBiBPr0Q1I

The test project is attached.

vrdaveb
Oculus Staff
Thanks, this is very helpful. I am surprised the issue doesn't occur in a new project after enabling VR for Android and adding Oculus to the list of supported devices. I can see that's the case in your project settings. As expected, Unity tries to use VR on your Win10 machine when you hit play and ovr_Create fails. However, the pop-up is not expected from publicly-shipping builds. Does the issue persist if you uninstall the Rift runtime?