From 2fdbe72e041636c7f9325cb94063814c00eac6ab Mon Sep 17 00:00:00 2001 From: Fabien Houlmann Date: Mon, 13 Apr 2020 14:30:02 -0400 Subject: [PATCH] Fix compile error with XR SubsystemManager --- .../CHANGELOG.md | 1 + .../Runtime/RenderPipeline/XR/XRSystem.cs | 10 ++++++++++ 2 files changed, 11 insertions(+) diff --git a/com.unity.render-pipelines.high-definition/CHANGELOG.md b/com.unity.render-pipelines.high-definition/CHANGELOG.md index 7143e42e5a5..ff2862175d9 100644 --- a/com.unity.render-pipelines.high-definition/CHANGELOG.md +++ b/com.unity.render-pipelines.high-definition/CHANGELOG.md @@ -525,6 +525,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Fix reflection hierarchy for CARPAINT in AxF. - Fix precise fresnel for delta lights for SVBRDF in AxF. - Fixed the debug exposure mode for display sky reflection and debug view baked lighting +- 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) {