From fc64394ac170e5895ff8df31c1b841140c6b0021 Mon Sep 17 00:00:00 2001 From: FrancescoC-Unity Date: Fri, 24 Jul 2020 13:25:38 +0200 Subject: [PATCH 1/2] Fix issue --- .../Runtime/Common/DynamicResolutionHandler.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/com.unity.render-pipelines.core/Runtime/Common/DynamicResolutionHandler.cs b/com.unity.render-pipelines.core/Runtime/Common/DynamicResolutionHandler.cs index 7ae4dc7cca9..3746fe009a6 100644 --- a/com.unity.render-pipelines.core/Runtime/Common/DynamicResolutionHandler.cs +++ b/com.unity.render-pipelines.core/Runtime/Common/DynamicResolutionHandler.cs @@ -159,7 +159,8 @@ public void Update(GlobalDynamicResolutionSettings settings, Action OnResolution ScalableBufferManager.ResizeBuffers(m_CurrentFraction, m_CurrentFraction); } - OnResolutionChange(); + if(OnResolutionChange != null) + OnResolutionChange(); } else { @@ -169,7 +170,8 @@ public void Update(GlobalDynamicResolutionSettings settings, Action OnResolution if(ScalableBufferManager.widthScaleFactor != m_PrevHWScaleWidth || ScalableBufferManager.heightScaleFactor != m_PrevHWScaleHeight) { - OnResolutionChange(); + if (OnResolutionChange != null) + OnResolutionChange(); } } } From a0dfdbcfb019e2cdc5e864fb60b74ff1e43cba50 Mon Sep 17 00:00:00 2001 From: FrancescoC-Unity Date: Fri, 24 Jul 2020 13:25:44 +0200 Subject: [PATCH 2/2] Changelog --- com.unity.render-pipelines.high-definition/CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/com.unity.render-pipelines.high-definition/CHANGELOG.md b/com.unity.render-pipelines.high-definition/CHANGELOG.md index 312f5878fd9..bd17988f4e7 100644 --- a/com.unity.render-pipelines.high-definition/CHANGELOG.md +++ b/com.unity.render-pipelines.high-definition/CHANGELOG.md @@ -750,6 +750,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Fixed a missing dependecy for choosing to evaluate transparent SSR. - Fixed issue that failed compilation when XR is disabled. - Fixed a compilation error in the IES code. +- Fixed issue with dynamic resolution handler when no OnResolutionChange callback is specified. ### Changed - Improve MIP selection for decals on Transparents