Search Unity

  1. Unity 2020.1 has been released.
    Dismiss Notice
  2. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice

Unity 2020.1.0f1 + OpenVR/SteamVR + HDRP

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

  1. Kalidor


    Sep 13, 2017

    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