Search Unity

Bug OpenXR build issues and Oculus Touch tracking broken

Discussion in 'VR' started by JanDawid, Sep 6, 2022.

  1. JanDawid

    JanDawid

    Joined:
    Jul 7, 2014
    Posts:
    283
    So I've taken an older Unity project of ours that used SteamVR and we have updated it to 2022.1.4f1, and along with that we updated SteamVR, and consequently OpenXR too.

    I'm using an Oculus Rift S for testing and, before I enabled "Oculus Plugin" in the "XR Plugin Management" settings, the game played fine in the Editor. However, in the build, all I would get is a black window on my desktop, the SteamVR space-home loading area in my HMD, and audio from the game. Turning "Oculus Plugin" on in the "XR Plugin Management" makes the game finally visible in the build, but now the controllers are no longer tracked. I've added the SteamVR Track Pose Driver components to the player hand objects, and they still don't track.

    I've done profiling, and deep profiling, for a development build (I was testing with non-development build before) and there were no errors to speak of.

    And yes, I've added the Oculus Touch Controller Interaction Profile to the OpenXR settings too. I've re-installed all of the XR plugins, followed any and all advice I could regarding OpenXR build issues, and nothing helps. I've tried different combinations of XR Plugins from the "XR Plugin Management" and nothing helps (this included Oculus, OpenVR Loader, OpenXR, and Mock HMD).

    This is all such a mess compared to when I worked on the original project back in 2020, it was nowhere near as complex. I've made sure everything is up-to-date, kept restarting the Unity Editor, the HMD, the PC, everything.

    Is there anything I've missed?
     
  2. Kajta

    Kajta

    Joined:
    Feb 13, 2016
    Posts:
    11
    Have you enabled Oculus as standard OpenXR runtime in the Oculus client?
     
  3. JanDawid

    JanDawid

    Joined:
    Jul 7, 2014
    Posts:
    283
    Yes I did that too. I've actually just decided to revert the project back to Unity 2019 and it's all working again. I hope to never work on VR in any later versions of Unity.
     
  4. Kajta

    Kajta

    Joined:
    Feb 13, 2016
    Posts:
    11
    As someone who has been developing VR in Unity since the Oculus DK2, I can truly say Unity has never been better for developing for VR.

    Furthermore, I would highly recommend ditching the Oculus and Steam plugins,and run it through OpenXR instead, you say you selected the Oculus XR sdk in the XR plugin management tab, this does not work for OpenXR, for that you need to enable OpenXR and disable Oculus in the plugin tab.

    I have feeling you do not have a complete vision about XR SDKs and how they are handled within Unity (Can't blame you, the stuff has been changing every year).

    If I may ask, what platforms/features do you need to support in the project?
    Just using OpenXR should be sufficient to support tracking and rendering for all major VR headsets right now. (And most smaller vendors)
     
  5. svenneve

    svenneve

    Joined:
    May 14, 2013
    Posts:
    80
    Does neartouch work on standard OpenXR? because we rolled back to libOVR as it wasn't working on Oculus OpenXR.