Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Feature Request OpenXR API Reference and Unity OpenXR

Discussion in 'VR' started by Kajta, May 31, 2022.

  1. Kajta


    Feb 13, 2016
    I was looking for a way to load controller models via OpenXR, and came across the following API call in the OpenXR API reference page: xrLoadControllerModelMSFT where the runtime attempts to return a model for the currently connected controller devices, supplied through a key also retrieved with an API call.

    I tried to call this via DLLImport, but I couldn't be found, so I checked the UnityOpenXR.DLL file with the dumpbin tool and noticed it did not have a call exposed for: xrLoadControllerModelMSFT, and most of the OpenXR API calls are missing.
    I checked Microsofts implementation of the OpenXR API thats in the MRTK toolkit, and I saw they exposed their own version of this method in their OpenXR runtime.

    Are there any plans to expose more of the native OpenXR calls, or is there another way I can access some of the functions like xrLoadControllerModelMSFT without creating my own native library for OpenXR?

    Also, does Unity not support OpenXR completely yet, or why does Unity not expose the OpenXR features/calls from the OpenXR API reference?
  2. DevDunk


    Feb 13, 2020
    I cannot answer the technical questions, but you can check which controllers are used in script via XR Management and then change the model yourself
  3. Zenorbi


    Oct 1, 2019
    OpenXR works like OpenGL in the sense that you don't have native functions floating around but you use xrGetInstanceProcAddr to get the function pointer. The xrGetInstanceProcAddr is available from

    I cannot really provide more details as I haven't needed this so far, just thought this might nudge you in the right direction.
    EricJohnsonVectrona likes this.