Search Unity

DllNotFoundException: openvr_api

Discussion in 'AR/VR (XR) Discussion' started by GalaxyCatGames, Jan 30, 2017.

  1. GalaxyCatGames

    GalaxyCatGames

    Joined:
    Oct 3, 2016
    Posts:
    2
    Hey everyone,

    I'm having an issue in my builds that is making them completely useless. I've searched everywhere and I can't seem to find any information on it. It makes it so the HMD displays nothing and the camera just stays at it's start position.

    I'm using Unity 5.5.0p3 by the way, any help would be appreciated.

    Here's the error:

    DllNotFoundException: openvr_api
    at (wrapper managed-to-native) Valve.VR.OpenVRInterop:GetInitToken ()
    at Valve.VR.OpenVR.GetInitToken () [0x00001] in D:\Unity Projects\VR-Scape - The Cavern\VR-Scape - The Cavern\Assets\SteamVR\Plugins\openvr_api.cs:4195
    at Valve.VR.OpenVR+COpenVRContext.CheckClear () [0x00000] in D:\Unity Projects\VR-Scape - The Cavern\VR-Scape - The Cavern\Assets\SteamVR\Plugins\openvr_api.cs:4380
    at Valve.VR.OpenVR+COpenVRContext.VRChaperone () [0x00002] in D:\Unity Projects\VR-Scape - The Cavern\VR-Scape - The Cavern\Assets\SteamVR\Plugins\openvr_api.cs:4403
    at Valve.VR.OpenVR.get_Chaperone () [0x00006] in D:\Unity Projects\VR-Scape - The Cavern\VR-Scape - The Cavern\Assets\SteamVR\Plugins\openvr_api.cs:4556
    at Valve.VR.InteractionSystem.ChaperoneInfo+<Start>c__Iterator0.MoveNext () [0x00023] in D:\Unity Projects\VR-Scape - The Cavern\VR-Scape - The Cavern\Assets\SteamVR\InteractionSystem\Teleport\Scripts\ChaperoneInfo.cs:57
    at UnityEngine.SetupCoroutine.InvokeMoveNext (IEnumerator enumerator, IntPtr returnValueAddress) [0x00028] in C:\buildslave\unity\build\Runtime\Export\Coroutines.cs:17

    (Filename: D:/Unity Projects/VR-Scape - The Cavern/VR-Scape - The Cavern/Assets/SteamVR/Plugins/openvr_api.cs Line: 4195)
     
  2. GalaxyCatGames

    GalaxyCatGames

    Joined:
    Oct 3, 2016
    Posts:
    2
    UPDATE: Looking at some older builds (I think from a previous version of 5.5.0, can't remember which though) it looks like there used to be some DLL's included in the Plugins folder of the build that I no longer have.

    - openvr_api.dll
    - OVRPlugin.dll

    Copying these from older builds and putting them in the Plugins folder of my new builds seems to fix the issue. Any idea why these would no longer be included in my builds? I feel like this might just be a bug with this version of Unity, but if that's the case, I'm shocked I'm the only person who's talked about the issue.
     
    leoc and Beennn like this.
  3. ozzyrys_

    ozzyrys_

    Joined:
    Dec 14, 2015
    Posts:
    1
    I'm having similar issue but with GearVR dll.
    Log from logcat:
    I tried Unity 5.5.0f3, 5.5.0p4, 5.5.1f1, 5.5.1p1. It is propably related to Known issue in 5.5.0b11 build (https://unity3d.com/unity/beta/unity5.5.0b11)
     
  4. SmartCarrion

    SmartCarrion

    Joined:
    Jul 27, 2013
    Posts:
    27
    I'm getting this too in 5.5.1p2!! But with Oculus. Including the old DLLs helps, but the oculus version has changed since I last built and I think that is causing additional issues.

    I submitted a bug report: (Case 880478)
     
  5. Egil-Sandfeld

    Egil-Sandfeld

    Joined:
    Oct 8, 2012
    Posts:
    72
    Thanks so much guys for figuring this out. Had this issue myself, after finding out that Oculus doesn't support 5.6.x yet. So I downgraded to 5.5.0f3, where I got the same issues you had. Updating the project to Unity 5.5.2f1 works on my end :D
     
    Staus likes this.
  6. alekz1k

    alekz1k

    Joined:
    Dec 14, 2014
    Posts:
    16
    Thanks so much @GalaxyCatGames! I'm reworking an old project on 5.5.0f3 and got the same issue. Replacing the plugins folder from an older build fixed it.

    +1 Cookie
     
  7. DanielleSisserman

    DanielleSisserman

    Joined:
    Jul 23, 2017
    Posts:
    1
  8. Ploopploop

    Ploopploop

    Joined:
    Oct 15, 2017
    Posts:
    4
  9. am_GA

    am_GA

    Joined:
    Oct 4, 2018
    Posts:
    20
    Just experienced this issue coming back after leaving the computer running for a day. SteamVR apparently updated (as it does almost daily) but I do not recall having updated Unity. I did have `openvr_api` in Assets > SteamVR > Plugins. I ended up solving the issue by reinstalling OpenVR which took about 30 seconds:

    Open the Package Manager (Window->Package Manager), select “OpenVR” in the package list and click install. Didn't even have to restart Unity.
     
    Last edited: Mar 4, 2020