SteamVR doesn't work with HDRP 7.4.1

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:

NullReferenceException: Object reference not set to an instance of an object
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)
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)
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)
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)
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)
UnityEngine.Rendering.RenderPipeline.InternalRender (UnityEngine.Rendering.ScriptableRenderContext context, UnityEngine.Camera[] cameras) (at <e98ed0368295432e8c11e52d6243ee11>:0)
UnityEngine.Rendering.RenderPipelineManager.DoRenderLoop_Internal (UnityEngine.Rendering.RenderPipelineAsset pipe, System.IntPtr loopPtr, Unity.Collections.LowLevel.Unsafe.AtomicSafetyHandle safety) (at <e98ed0368295432e8c11e52d6243ee11>:0)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)

Anyone know a workaround so I can still use SteamVR in HDRP 7.4.1?

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.

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…

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!

I found a possible solution SteamVR instance is never initialized due to XRSettings.enabled being false · Issue #793 · ValveSoftware/steamvr_unity_plugin · GitHub

Did you find any fix vingard?

1 Like

My colleague meets the same situation, i use HDRP7.3.1 with 2019.4.0 is right before.

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.