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
If it occurs after uninstalling the Rift Runtime, you probably have a debug copy of LibOVRRT*.dll on PATH. Can you remove that and make sure OVRServer.exe isn't running? I assume you are also using the copy of OVRPlugin that came with Unity 5.6.0f3 and not some other build.
I had the same problem after upgrading from Unity 5.5 to 5.6. Fixed it by deleting the Temp & Library folders, all Visual Studio files and the Project Settings folder (close Unity before deleting them). After this I had to re-apply all project settings manually (cumbersome work).
Apologies for the delay getting back to you with results. I have tried all the suggestions - unfortunately there has not been an improvement. Specifically, I:
removed oculus runtime
confirmed there was no LibOVRRT anywhere on my system
confirmed OVRServer was shut down
deleted /Assets/OVR and /Assets/Plugins/OVRGamepad.bundle
reinstalled OculusUtilities-1.13.0.unitypackage to ensure OVRPlugin.cs was up to date
See attached images and let me know if anything else comes to you.
No libOVRRT anywhere:
No OVRServer running:
Note the "no HMD attached" text is now missing, but it still exits no matter which I choose:
Do you have any other VR SDKs in use such as SteamVR/OpenVR? Some SDKs try to wrap LibOVR and may display messages like this when our runtime isn't installed.