Search Unity

Resolved SteamVR doesn't work with HDRP 7.4.1

Discussion in 'AR/VR (XR) Discussion' started by vingard, Jun 9, 2020.

Thread Status:
Not open for further replies.
  1. vingard

    vingard

    Joined:
    Nov 7, 2014
    Posts:
    2
    Seems like HDRP 7.4.1 has broken SteamVR. I've tested this on a default template HDRP project with HDRP version 7.4.1 and SteamVR. Seems like the changes to SkyManager.cs have broken it, here is the error:
    Code (CSharp):
    1. NullReferenceException: Object reference not set to an instance of an object
    2. UnityEngine.Rendering.HighDefinition.SkyManager.UpdateEnvironment (UnityEngine.Rendering.HighDefinition.HDCamera hdCamera, UnityEngine.Rendering.ScriptableRenderContext renderContext, UnityEngine.Rendering.HighDefinition.SkyUpdateContext skyContext, UnityEngine.Light sunLight, System.Boolean updateRequired, System.Boolean updateAmbientProbe, System.Boolean staticSky, UnityEngine.Rendering.HighDefinition.SkyAmbientMode ambientMode, System.Int32 frameIndex, UnityEngine.Rendering.CommandBuffer cmd) (at Library/PackageCache/com.unity.render-pipelines.high-definition@7.4.1/Runtime/Sky/SkyManager.cs:705)
    3. UnityEngine.Rendering.HighDefinition.SkyManager.UpdateEnvironment (UnityEngine.Rendering.HighDefinition.HDCamera hdCamera, UnityEngine.Rendering.ScriptableRenderContext renderContext, UnityEngine.Light sunLight, System.Int32 frameIndex, UnityEngine.Rendering.CommandBuffer cmd) (at Library/PackageCache/com.unity.render-pipelines.high-definition@7.4.1/Runtime/Sky/SkyManager.cs:809)
    4. UnityEngine.Rendering.HighDefinition.HDRenderPipeline.UpdateSkyEnvironment (UnityEngine.Rendering.HighDefinition.HDCamera hdCamera, UnityEngine.Rendering.ScriptableRenderContext renderContext, System.Int32 frameIndex, UnityEngine.Rendering.CommandBuffer cmd) (at Library/PackageCache/com.unity.render-pipelines.high-definition@7.4.1/Runtime/RenderPipeline/HDRenderPipeline.cs:3423)
    5. UnityEngine.Rendering.HighDefinition.HDRenderPipeline.ExecuteRenderRequest (UnityEngine.Rendering.HighDefinition.HDRenderPipeline+RenderRequest renderRequest, UnityEngine.Rendering.ScriptableRenderContext renderContext, UnityEngine.Rendering.CommandBuffer cmd, UnityEngine.Rendering.HighDefinition.AOVRequestData aovRequest) (at Library/PackageCache/com.unity.render-pipelines.high-definition@7.4.1/Runtime/RenderPipeline/HDRenderPipeline.cs:2009)
    6. UnityEngine.Rendering.HighDefinition.HDRenderPipeline.Render (UnityEngine.Rendering.ScriptableRenderContext renderContext, UnityEngine.Camera[] cameras) (at Library/PackageCache/com.unity.render-pipelines.high-definition@7.4.1/Runtime/RenderPipeline/HDRenderPipeline.cs:1831)
    7. UnityEngine.Rendering.RenderPipeline.InternalRender (UnityEngine.Rendering.ScriptableRenderContext context, UnityEngine.Camera[] cameras) (at <e98ed0368295432e8c11e52d6243ee11>:0)
    8. UnityEngine.Rendering.RenderPipelineManager.DoRenderLoop_Internal (UnityEngine.Rendering.RenderPipelineAsset pipe, System.IntPtr loopPtr, Unity.Collections.LowLevel.Unsafe.AtomicSafetyHandle safety) (at <e98ed0368295432e8c11e52d6243ee11>:0)
    9. UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)
    10.  
    Anyone know a workaround so I can still use SteamVR in HDRP 7.4.1?
     
  2. vingard

    vingard

    Joined:
    Nov 7, 2014
    Posts:
    2
    *cant edit due to a spam blocker* This causes the game to only render in the left eye and stops the game view from working.
     
  3. Aaron-Meyers

    Aaron-Meyers

    Joined:
    Dec 8, 2009
    Posts:
    295
    I haven't used SteamVR recently, but I got this same thing using XR Management with the Oculus Plugin. It goes away if you switch from Multi Pass to Single Pass Instanced. Might work for SteamVR too...
     
  4. kinacho

    kinacho

    Joined:
    Apr 1, 2020
    Posts:
    2
    Update steam vr to 2.6.0b4 taking care about your changes over the SteamVR path or you need to modify all materials again.
    Update open vr to lastest version.
    You need use XR plugin Managment
    It only worked on Unity 2020.1.2 for me (2019.x doesn't work because dll not found exception from OpenVR)

    after that I commented 2 lines of SteamVR.cs (33 and 34) and the VR works (with controllers)! these lines checks XRSettings (I think that was deprecated)
    But now I have an editor crash problem when I press stop on play mode (I sent a report) with all these specs.

    Good luck!
     
  5. kinacho

    kinacho

    Joined:
    Apr 1, 2020
    Posts:
    2
  6. Mockarutan

    Mockarutan

    Joined:
    May 22, 2011
    Posts:
    78
    ROBYER1 likes this.
  7. nongzhang1992

    nongzhang1992

    Joined:
    Aug 21, 2020
    Posts:
    4
    My colleague meets the same situation, i use HDRP7.3.1 with 2019.4.0 is right before.
     
  8. mfuad

    mfuad

    Unity Technologies

    Joined:
    Jun 12, 2018
    Posts:
    301
    If you are still having issues with HDRP, please file a bug so the teams can investigate. As a reminder, the SteamVR plugin is developed and maintained by Valve. Please post plugin-specific issues on their Github so their team can address.
     
Thread Status:
Not open for further replies.
unityunity