Skip to main content
Up and Coming
April 3, 2017

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

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


This topic has been closed for replies.

26 replies

Up and Coming
April 3, 2017
Also note that when the error pops up, I am presented with two choices "QUIT" and "OK" - pressing either button causes Unity to exit.
Up and Coming
April 5, 2017
If it helps, I'm seeing the same problem on Unity 5.6 as well.
Up and Coming
April 8, 2017
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?
Up and Coming
April 13, 2017
Perhaps a directory or DLL I can remove?  Anything? I still cannot play in editor.
Inspiring
April 13, 2017
> 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?
Up and Coming
April 13, 2017
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:


However, when I press OK, Unity exits/crashes, so I still cannot play in Editor.  How can I disable this?!
Up and Coming
April 13, 2017
Thanks for the reply @vrdaveb.  Here is the Editor.log.
Inspiring
April 13, 2017
I don't see any crashes in that log. Can you provide one from just after the crash?
Up and Coming
April 13, 2017
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".
Up and Coming
April 13, 2017
It may also be worth mentioning that after Unity exits, Oculus Home starts up.