Skip to content

Commit 491c111

Browse files
svc-reach-platform-supportEvergreen
authored andcommitted
[Port] [6000.5] UUM-145389 : Fix issues when reassigning the same APV baking set in the Lighting Tab's Current Baking Set
1 parent 92a12fd commit 491c111

1 file changed

Lines changed: 11 additions & 4 deletions

File tree

Packages/com.unity.render-pipelines.core/Editor/Lighting/ProbeVolume/ProbeVolumeLightingTab.cs

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -347,7 +347,11 @@ void BakingGUI()
347347
m_SingleSceneMode = EditorGUILayout.Popup(Styles.bakingMode, m_SingleSceneMode ? 0 : 1, Styles.bakingModeOptions) == 0;
348348
if (EditorGUI.EndChangeCheck() && !m_SingleSceneMode)
349349
{
350-
if (activeSet != null) { EditorUtility.SetDirty(activeSet); activeSet.singleSceneMode = false; }
350+
if (activeSet != null)
351+
{
352+
EditorUtility.SetDirty(activeSet);
353+
activeSet.singleSceneMode = false;
354+
}
351355
SaveTempBakingSetIfNeeded();
352356
}
353357

@@ -357,11 +361,14 @@ void BakingGUI()
357361
return;
358362
}
359363

360-
EditorGUI.BeginChangeCheck();
361364
var newSet = ObjectFieldWithNew(Styles.currentBakingSet, activeSet, CreateBakingSet);
362-
if (EditorGUI.EndChangeCheck())
365+
if (newSet != activeSet)
363366
{
364-
if (newSet != null) { EditorUtility.SetDirty(newSet); newSet.singleSceneMode = false; }
367+
if (newSet != null)
368+
{
369+
EditorUtility.SetDirty(newSet);
370+
newSet.singleSceneMode = false;
371+
}
365372
activeSet = newSet;
366373

367374
ProbeReferenceVolume.instance.Clear();

0 commit comments

Comments
 (0)