Search Unity

Unity 2020.1.0f1 + OpenVR/SteamVR + HDRP

Discussion in 'VR' started by Kalidor, Jul 28, 2020.

  1. Kalidor

    Kalidor

    Joined:
    Sep 13, 2017
    Posts:
    14
    Hi!

    Is it possible to get OpenVR/SteamVR working with Unity 2020.1.0f1 + HDRP? I'm using the SteamVR Unity Plugin v2.6.0b3. I got it working without the HDRP. With the HDRP enabled the following exception is thrown:

    Code (csharp):
    1.  NullReferenceException: Object reference not set to an instance of an object
    2. Valve.VR.SteamVR_Action_Pose_Source.UpdateValue (System.Boolean skipStateAndEventUpdates) (at Assets/SteamVR/Input/SteamVR_Action_Pose.cs:575)
    3. Valve.VR.SteamVR_Action_Skeleton_Source.UpdateValue (System.Boolean skipStateAndEventUpdates) (at Assets/SteamVR/Input/SteamVR_Action_Skeleton.cs:917)
    4. Valve.VR.SteamVR_Action_Skeleton.UpdateValue (System.Boolean skipStateAndEventUpdates) (at Assets/SteamVR/Input/SteamVR_Action_Skeleton.cs:65)
    5. Valve.VR.SteamVR_Input.UpdateSkeletonActions (System.Boolean skipSendingEvents) (at Assets/SteamVR/Input/SteamVR_Input.cs:355)
    6. Valve.VR.SteamVR_Input.LateUpdate () (at Assets/SteamVR/Input/SteamVR_Input.cs:269)
    7. Valve.VR.SteamVR_Behaviour.LateUpdate () (at Assets/SteamVR/Scripts/SteamVR_Behaviour.cs:238)
    The problem is that SteamVR.instance is null. When starting a sample scene SteamVR gets successfully initialized. Then the excpetion is thrown.

    Update: XRSettings.enabled is false. That's why Dispose is called and SteamVR.instance is null.
     
    Last edited: Jul 28, 2020
  2. unity_Kp2fsMj7Fo9voA

    unity_Kp2fsMj7Fo9voA

    Joined:
    Jan 16, 2020
    Posts:
    1
    Did you find a working solution?
    I'm stuck with this problem too
     
  3. doktorbanana

    doktorbanana

    Joined:
    Aug 25, 2020
    Posts:
    4
    same problem. I tried to just set the XRSettings.enabled to true in a sperate sript.
    Didnt work. Did anyone fix this?