diff --git a/com.unity.render-pipelines.high-definition/CHANGELOG.md b/com.unity.render-pipelines.high-definition/CHANGELOG.md index 33f1c485818..26b1da0fd7a 100644 --- a/com.unity.render-pipelines.high-definition/CHANGELOG.md +++ b/com.unity.render-pipelines.high-definition/CHANGELOG.md @@ -32,6 +32,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Fixed light mode not available after switching a light to area "Disc" or "Tube" (case 1372588). - Fixed CoC size computation when dynamic resolution is enabled - Fixed shadow cascade transition not working properly with bias. +- Fixed broken rendering when duplicating a camera while the Rendering Debugger is opened. ### Changed - Optimizations for the physically based depth of field. diff --git a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/Camera/HDAdditionalCameraData.cs b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/Camera/HDAdditionalCameraData.cs index 046ede549ba..6c9b4784ec2 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/Camera/HDAdditionalCameraData.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/Camera/HDAdditionalCameraData.cs @@ -690,6 +690,11 @@ void OnEnable() m_Camera.allowMSAA = false; // We don't use this option in HD (it is legacy MSAA) and it produce a warning in the inspector UI if we let it m_Camera.allowHDR = false; + // By doing that, we force the update of frame settings debug data once. Otherwise, when the Rendering Debugger is opened, + // Wrong data is registered to the undo system because it did not get the chance to be updated once. + FrameSettings dummy = new FrameSettings(); + FrameSettingsHistory.AggregateFrameSettings(ref dummy, m_Camera, this, HDRenderPipeline.currentAsset, null); + RegisterDebug(); #if UNITY_EDITOR