Skip to content

Commit caa015b

Browse files
Revert "Fixed an exception thrown when closing the lookdev because there is no active SRP anymore. (#1925)"
This reverts commit 5388f4a.
1 parent 933fc9f commit caa015b

File tree

2 files changed

+11
-14
lines changed

2 files changed

+11
-14
lines changed

com.unity.render-pipelines.core/Editor/LookDev/DisplayWindow.cs

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -625,19 +625,6 @@ IStyle GetEnvironmentContenairDraggerStyle()
625625
}
626626
}
627627

628-
void Update()
629-
{
630-
// [case 1245086] Guard in case the SRP asset is set to null (or to a not supported SRP) when the lookdev window is already open
631-
// Note: After an editor reload, we might get a null OnUpdateRequestedInternal and null SRP for a couple of frames, hence the check.
632-
if (!LookDev.supported && OnUpdateRequestedInternal != null)
633-
{
634-
// Print an error and close the Lookdev window (to avoid spamming the console)
635-
Debug.LogError($"LookDev is not supported by this Scriptable Render Pipeline: "
636-
+ (RenderPipelineManager.currentPipeline == null ? "No SRP in use" : RenderPipelineManager.currentPipeline.ToString()));
637-
LookDev.Close();
638-
}
639-
}
640-
641628
void OnGUI()
642629
{
643630
//Stylesheet
@@ -703,6 +690,17 @@ void OnGUI()
703690
rootVisualElement.styleSheets.Add(styleSheetLight);
704691
}
705692

693+
// [case 1245086] Guard in case the SRP asset is set to null (or to a not supported SRP) when the lookdev window is already open
694+
// Note: After an editor reload, we might get a null OnUpdateRequestedInternal and null SRP for a couple of frames, hence the check.
695+
if (!LookDev.supported && OnUpdateRequestedInternal !=null)
696+
{
697+
// Print an error and close the Lookdev window (to avoid spamming the console)
698+
Debug.LogError($"LookDev is not supported by this Scriptable Render Pipeline: "
699+
+ (RenderPipelineManager.currentPipeline == null ? "No SRP in use" : RenderPipelineManager.currentPipeline.ToString()));
700+
LookDev.Close();
701+
return;
702+
}
703+
706704
OnUpdateRequestedInternal?.Invoke();
707705
}
708706
}

com.unity.render-pipelines.high-definition/CHANGELOG.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,6 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
9191
- Fixed serialization issue with matcap scale intensity.
9292
- Close Add Override popup of Volume Inspector when the popup looses focus (case 1258571)
9393
- Light quality setting for contact shadow set to on for High quality by default.
94-
- Fixed an exception thrown when closing the look dev because there is no active SRP anymore.
9594

9695
### Changed
9796
- Preparation pass for RTSSShadows to be supported by render graph.

0 commit comments

Comments
 (0)