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
Also note that when the error pops up, I am presented with two choices "QUIT" and "OK" - pressing either button causes Unity to exit.

boblaublaw
Honored Guest
If it helps, I'm seeing the same problem on Unity 5.6 as well.

boblaublaw
Honored Guest
This appears to be specific to an important project I have going.  When I start a new project in 5.6 and load in the OVR Samples, it does not crash.  How can I reset whatever oculus lib bindings exist in a given project?

boblaublaw
Honored Guest
Perhaps a directory or DLL I can remove?  Anything? I still cannot play in editor.

vrdaveb
Oculus Staff
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 just tried this in 5.6 on Windows with a new project and it worked. When Unity can't initialize LibOVR, it normally fails over to non-VR. It should never crash. Can you provide %LOCALAPPDATA%\Unity\Editor\Editor.log and make sure VR support is disabled in the Windows configuration and you don't have OVRPlugin.dll anywhere in your project's Assets folder?

boblaublaw
Honored Guest
I have tried many things with the following outcomes:
  • cleared /Library/ and rebuilt: no effect
  • reinstalled/updated OVR: no effect
  • reinstalled Oculus Home: now I get the following error:
36ds8hpip1a8.jpg

However, when I press OK, Unity exits/crashes, so I still cannot play in Editor.  How can I disable this?!

boblaublaw
Honored Guest
Thanks for the reply @vrdaveb.  Here is the Editor.log.

vrdaveb
Oculus Staff
I don't see any crashes in that log. Can you provide one from just after the crash?

boblaublaw
Honored Guest
I didn't either.  I restarted Unity, selected my project, hit "play", saw the most recent error message (screen shot above), selected "OK", then Unity exited.  Fresh log attached.

Given that I was presented with "QUIT" and "OK", I do not expect Unity to quit when I press "OK", which is why I referred to it as "crashing", but it is entirely possible some logic has decided to exit without crash after I press "OK".