Skip to content

Commit 574fc83

Browse files
dhsavellEvergreen
authored andcommitted
[UUM-100205] Fix exception when changing SG variant limit under certain conditions
1 parent 94b4d40 commit 574fc83

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

  • Packages/com.unity.shadergraph/Editor/Data/Graphs

Packages/com.unity.shadergraph/Editor/Data/Graphs/GraphData.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2875,6 +2875,8 @@ public void OnEnable()
28752875
node.OnEnable();
28762876
}
28772877

2878+
// OnEnable may be called multiple times. Ensure the callback only exists once.
2879+
ShaderGraphPreferences.onVariantLimitChanged -= OnKeywordChanged;
28782880
ShaderGraphPreferences.onVariantLimitChanged += OnKeywordChanged;
28792881
}
28802882

0 commit comments

Comments
 (0)