diff --git a/com.unity.render-pipelines.high-definition/CHANGELOG.md b/com.unity.render-pipelines.high-definition/CHANGELOG.md index ce7366ecc9c..38855887f58 100644 --- a/com.unity.render-pipelines.high-definition/CHANGELOG.md +++ b/com.unity.render-pipelines.high-definition/CHANGELOG.md @@ -527,6 +527,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Fixed the debug exposure mode for display sky reflection and debug view baked lighting - Fixed MSAA depth resolve when there is no motion vectors - Fixed various object leaks in HDRP. +- Fixed compile error with XR SubsystemManager. ### Changed - Color buffer pyramid is not allocated anymore if neither refraction nor distortion are enabled diff --git a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/XR/XRSystem.cs b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/XR/XRSystem.cs index e7d5d48222d..8f0db6e9e3f 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/XR/XRSystem.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/XR/XRSystem.cs @@ -73,7 +73,12 @@ internal XRSystem(RenderPipelineResources.ShaderResources shaders) [RuntimeInitializeOnLoadMethod(RuntimeInitializeLoadType.BeforeSplashScreen)] internal static void XRSystemInit() { + + #if UNITY_2020_2_OR_NEWER + SubsystemManager.GetSubsystems(displayList); + #else SubsystemManager.GetInstances(displayList); + #endif for (int i = 0; i < displayList.Count; i++) { @@ -161,7 +166,12 @@ internal void ReleaseFrame() bool RefreshXrSdk() { #if ENABLE_VR && ENABLE_XR_MODULE + + #if UNITY_2020_2_OR_NEWER + SubsystemManager.GetSubsystems(displayList); + #else SubsystemManager.GetInstances(displayList); + #endif if (displayList.Count > 0) {