Skip to content

[HDRP] Fixed lookdev reload bug when viewing a scene object #3108

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Jan 15, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions com.unity.render-pipelines.core/Editor/LookDev/LookDev.cs
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,10 @@ internal static void Initialize(DisplayWindow window)
s_ViewDisplayer = window;
s_EnvironmentDisplayer = window;
open = true;
ConfigureLookDev(reloadWithTemporaryID: false);

// Lookdev Initialize can be called when the window is re-created by the editor layout system.
// In that case, the current context won't be null and there might be objects to reload from the temp ID
ConfigureLookDev(reloadWithTemporaryID: s_CurrentContext != null);
}

[Callbacks.DidReloadScripts]
Expand Down Expand Up @@ -188,10 +191,6 @@ static void LinkViewDisplayer()
s_ViewDisplayer = null;
//currentContext = null;

//release editorInstanceIDs
currentContext.GetViewContent(ViewIndex.First).CleanTemporaryObjectIndexes();
currentContext.GetViewContent(ViewIndex.Second).CleanTemporaryObjectIndexes();

SaveConfig();

open = false;
Expand Down
1 change: 1 addition & 0 deletions com.unity.render-pipelines.high-definition/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
- Fixed box light attenuation.
- Fixed compilation issues on platforms that don't support XR.
- Fixed issue with compute shader stripping for probe volumes variants.
- Fixed a reload bug when using objects from the scene in the lookdev (case 1300916).

### Changed
- Removed the material pass probe volumes evaluation mode.
Expand Down