Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Question Unity->Hololens 2 missing DLL (WindowsMRXRSDK.dll) in build

Discussion in 'XR Interaction Toolkit and Input' started by NotSteffen, Jul 30, 2021.

  1. NotSteffen

    NotSteffen

    Joined:
    Jan 5, 2021
    Posts:
    4
    I'm trying to follow the guide from this MS tutorial, that has an example project. The problem is, that when I try to run the built project, it throws this error:

    Code (CSharp):
    1. Exception thrown at 0x00007FFA952348CC in AR Comply.exe: Microsoft C++ exception: Il2CppExceptionWrapper at memory location 0x000000F991BFD340.
    2. DllNotFoundException: Unable to load DLL 'WindowsMRXRSDK': The specified module could not be found.
    3.   at UnityEngine.XR.WindowsMR.Native.GetOriginSpatialCoordinateSystem () [0x00000] in <00000000000000000000000000000000>:0
    4.   at UnityEngine.XR.WindowsMR.WindowsMREnvironment.get_OriginSpatialCoordinateSystem () [0x00000] in <00000000000000000000000000000000>:0
    5.   at QRTracking.SpatialGraphCoordinateSystem.UpdateLocation () [0x00000] in <00000000000000000000000000000000>:0
    6.   at QRTracking.SpatialGraphCoordinateSystem.Update () [0x00000] in <00000000000000000000000000000000>:0
    This Spatializer plugin seems to be a symbol in the VS editor (which I guess means that it is a compiled symbol). I then checked if the DLL is actually being saved anywhere to the build folder, and it isn't, which may or may not be the error (or maybe it's not being registered as a dependency for some reason)

    I'm guessing this DLL is coming from the "Windows XR plugin" package, since there's no package called "Windows Mixed Reality" anymore.

    For this project, the QR tracking and reader is a must, so this is a blocker for us right now.

    Does anyone know what might be the issue here? Am I missing a step or a manual dependency binding? Can I add the dll manually (I tried copying the dll for the different targets into the right folders in the build folder, but obviously this didn't work)? Maybe it's caused by new and updated package/package names? What should I look out for?

    **I guess I'm spoiled a bit by Oculus VR and OpenXR. I've been working with the Quests for the last couple of years, and I have never had this kind of problem.**


    Software info:
    Windows 10,
    Unity 2020.3.12f1.
    Visual Studio 2019 Version 16.10.4
    An Updated Hololens 2 fitted with the XR10 helmet.
     
  2. NotSteffen

    NotSteffen

    Joined:
    Jan 5, 2021
    Posts:
    4
    I found out that I can manually from
    \Library\PackageCache\com.unity.xr.windowsmr@4.5.0\Runtime\Plugins
    to
    \build\bin\ARM64\[Solution Configuration (i.e: Release)]\AppX
    to get it to work. It's a little bothersome to remember though.
     
  3. the_real_apoxol

    the_real_apoxol

    Unity Technologies

    Joined:
    Dec 18, 2020
    Posts:
    467
    Are you trying to use the WMR XRSDK plugin with OpenXR at the same time? I am trying to understand your setup to better help.
     
  4. NotSteffen

    NotSteffen

    Joined:
    Jan 5, 2021
    Posts:
    4
    Yes- It seems to be my only option to get it to work. Also - for some reason - It only occurs sometimes, and I can't seem to figure out the pattern from build to build. There's literally two different result between builds with no changes to the project.
     
  5. the_real_apoxol

    the_real_apoxol

    Unity Technologies

    Joined:
    Dec 18, 2020
    Posts:
    467