diff --git a/com.unity.render-pipelines.core/Editor/LookDev/DisplayWindow.cs b/com.unity.render-pipelines.core/Editor/LookDev/DisplayWindow.cs index 12b7368fccc..fd1a725f16a 100644 --- a/com.unity.render-pipelines.core/Editor/LookDev/DisplayWindow.cs +++ b/com.unity.render-pipelines.core/Editor/LookDev/DisplayWindow.cs @@ -42,7 +42,7 @@ public interface IViewDisplayer /// Callback on update requested event Action OnUpdateRequested; } - + partial class DisplayWindow : EditorWindow, IViewDisplayer { static partial class Style @@ -82,7 +82,7 @@ internal static readonly (Texture2D icon, string tooltip) k_LayoutStackIcon = internal const string k_CameraMenuSync1On2 = "Align Camera 1 with Camera 2"; internal const string k_CameraMenuSync2On1 = "Align Camera 2 with Camera 1"; internal const string k_CameraMenuReset = "Reset Cameras"; - + internal const string k_EnvironmentSidePanelName = "Environment"; internal const string k_DebugSidePanelName = "Debug"; @@ -127,7 +127,7 @@ internal static readonly (Texture2D icon, string tooltip) k_LayoutStackIcon = Label m_NoEnvironment2; Image[] m_Views = new Image[2]; - + LayoutContext layout => LookDev.currentContext.layout; @@ -143,7 +143,7 @@ Layout viewLayout } } } - + SidePanel sidePanel { get => layout.showedSidePanel; @@ -218,7 +218,7 @@ event Action IViewDisplayer.OnUpdateRequested void OnEnable() { - //Stylesheet + //Stylesheet // Try to load stylesheet. Timing can be odd while upgrading packages (case 1219692). // In this case, it will be fixed in OnGUI. Though it can spawn error while reimporting assets. // Waiting for filter on stylesheet (case 1228706) to remove last error. @@ -486,7 +486,7 @@ Rect IViewDisplayer.GetRect(ViewCompositionIndex index) throw new ArgumentException("Unknown ViewCompositionIndex: " + index); } } - + Vector2 m_LastFirstViewSize = new Vector2(); Vector2 m_LastSecondViewSize = new Vector2(); void IViewDisplayer.SetTexture(ViewCompositionIndex index, Texture texture) @@ -532,7 +532,7 @@ void IViewDisplayer.SetTexture(ViewCompositionIndex index, Texture texture) throw new ArgumentException("Unknown ViewCompositionIndex: " + index); } } - + void IViewDisplayer.Repaint() => Repaint(); void ApplyLayout(Layout value) @@ -627,19 +627,21 @@ IStyle GetEnvironmentContenairDraggerStyle() void OnGUI() { - //Stylesheet + //Stylesheet // [case 1219692] if LookDev is open while reimporting CoreRP package, // stylesheet can be null. In this case, we can have a null stylesheet - // registered as it got destroyed. Reloading it. As we cannot just + // registered as it got destroyed. Reloading it. As we cannot just // remove a null entry, we must filter and reconstruct the while list. if (styleSheet == null || styleSheet.Equals(null) || (!EditorGUIUtility.isProSkin && (styleSheetLight == null || styleSheetLight.Equals(null)))) { // While (case 1228706) is still on going, we sill close and reopen the look dev. // This will prevent spawning error at frame. - LookDev.Close(); - LookDev.Open(); - return; + // Note 2: This actually causes the lookdev to break completely with light theme. + // Until the actual issue is fixed, we'll comment this fix out as it only concerns an upgrade problem. + //LookDev.Close(); + //LookDev.Open(); + //return; // Following lines is the correct fix if UIElement filter garbage collected Stylesheet. diff --git a/com.unity.render-pipelines.high-definition/CHANGELOG.md b/com.unity.render-pipelines.high-definition/CHANGELOG.md index 82913a7987c..76433cef418 100644 --- a/com.unity.render-pipelines.high-definition/CHANGELOG.md +++ b/com.unity.render-pipelines.high-definition/CHANGELOG.md @@ -72,6 +72,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Fix inconsistencies with transparent motion vectors and opaque by allowing camera only transparent motion vectors. - Fixed issue with depth pyramid generation and dynamic resolution. - Fixed a serialization issue, preventing quality level parameters to undo/redo and update scene view on change. +- Fixed an issue where opening the look dev window with the light theme would make the window blink and eventually crash unity. ### Changed - Shadowmask and realtime reflection probe property are hide in Quality settings