diff --git a/com.unity.render-pipelines.core/Editor/LookDev/DisplayWindow.cs b/com.unity.render-pipelines.core/Editor/LookDev/DisplayWindow.cs
index 04b8d919cd0..20a4a5ad363 100644
--- a/com.unity.render-pipelines.core/Editor/LookDev/DisplayWindow.cs
+++ b/com.unity.render-pipelines.core/Editor/LookDev/DisplayWindow.cs
@@ -239,7 +239,7 @@ void OnEnable()
// in case the window where open when last editor session finished.
// (Else it will open at start and has nothing to display).
if (!LookDev.open)
- LookDev.Open();
+ LookDev.Initialize(this);
titleContent = Style.k_WindowTitleAndIcon;
diff --git a/com.unity.render-pipelines.core/Editor/LookDev/LookDev.cs b/com.unity.render-pipelines.core/Editor/LookDev/LookDev.cs
index 08f04fb0eda..42064ef6989 100644
--- a/com.unity.render-pipelines.core/Editor/LookDev/LookDev.cs
+++ b/com.unity.render-pipelines.core/Editor/LookDev/LookDev.cs
@@ -93,10 +93,7 @@ internal static void SaveConfig(string path = lastRenderingDataSavePath)
/// Open the LookDev window
public static void Open()
{
- var Window = EditorWindow.GetWindow();
- s_ViewDisplayer = Window;
- s_EnvironmentDisplayer = Window;
- ConfigureLookDev(reloadWithTemporaryID: false);
+ EditorWindow.GetWindow();
}
/// Close the LookDev window
@@ -108,6 +105,14 @@ public static void Close()
s_EnvironmentDisplayer = null;
}
+ internal static void Initialize(DisplayWindow window)
+ {
+ s_ViewDisplayer = window;
+ s_EnvironmentDisplayer = window;
+ open = true;
+ ConfigureLookDev(reloadWithTemporaryID: false);
+ }
+
[Callbacks.DidReloadScripts]
static void OnEditorReload()
{
@@ -158,8 +163,6 @@ static void ConfigureRenderer(bool reloadWithTemporaryID)
static void LinkViewDisplayer()
{
- EditorApplication.playModeStateChanged += state => Close();
-
s_ViewDisplayer.OnClosed += () =>
{
s_Compositor?.Dispose();
diff --git a/com.unity.render-pipelines.high-definition/CHANGELOG.md b/com.unity.render-pipelines.high-definition/CHANGELOG.md
index 22ed5d951b4..85b68c27595 100644
--- a/com.unity.render-pipelines.high-definition/CHANGELOG.md
+++ b/com.unity.render-pipelines.high-definition/CHANGELOG.md
@@ -93,6 +93,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
- Light quality setting for contact shadow set to on for High quality by default.
- Fixed an exception thrown when closing the look dev because there is no active SRP anymore.
- Fixed alignment of framesettings in HDRP Default Settings
+- Fixed an exception thrown when closing the look dev because there is no active SRP anymore.
+- Fixed an issue where entering playmode would close the LookDev window.
### Changed
- Preparation pass for RTSSShadows to be supported by render graph.