From 11d304b982fff3cfcb4a3a15b20deb4bd4ec42a3 Mon Sep 17 00:00:00 2001 From: Remi Slysz <40034005+RSlysz@users.noreply.github.com> Date: Tue, 12 May 2020 13:50:56 +0200 Subject: [PATCH 1/2] fix nullref on DecalComponent removed from contextual menu --- .../Editor/Material/Decal/DecalProjectorEditor.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/com.unity.render-pipelines.high-definition/Editor/Material/Decal/DecalProjectorEditor.cs b/com.unity.render-pipelines.high-definition/Editor/Material/Decal/DecalProjectorEditor.cs index ab124573fa3..aa2ce0acb8a 100644 --- a/com.unity.render-pipelines.high-definition/Editor/Material/Decal/DecalProjectorEditor.cs +++ b/com.unity.render-pipelines.high-definition/Editor/Material/Decal/DecalProjectorEditor.cs @@ -125,9 +125,10 @@ private void OnEnable() private void OnDisable() { - foreach (var decalProjector in targets) + foreach (DecalProjector decalProjector in targets) { - (decalProjector as DecalProjector).OnMaterialChange -= UpdateMaterialEditor; + if (decalProjector != null) + decalProjector.OnMaterialChange -= UpdateMaterialEditor; } s_Owner = null; } From c08e49c333201bb5611e30ef37d7bf8c567262fa Mon Sep 17 00:00:00 2001 From: Remi Slysz <40034005+RSlysz@users.noreply.github.com> Date: Tue, 12 May 2020 14:17:28 +0200 Subject: [PATCH 2/2] Update CHANGELOG.md --- com.unity.render-pipelines.high-definition/CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/com.unity.render-pipelines.high-definition/CHANGELOG.md b/com.unity.render-pipelines.high-definition/CHANGELOG.md index e6d59ed0021..89177b2f5d7 100644 --- a/com.unity.render-pipelines.high-definition/CHANGELOG.md +++ b/com.unity.render-pipelines.high-definition/CHANGELOG.md @@ -581,6 +581,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Fixed flickering of the game/scene view when lookdev is running. - Fixed issue with reflection probes in realtime time mode with OnEnable baking having wrong lighting with sky set to dynamic (case 1238047). - Fixed transparent motion vectors not working when in MSAA. +- Fix error when removing DecalProjector from component contextual menu (case 1243960) ### Changed - Improve MIP selection for decals on Transparents