diff --git a/com.unity.shadergraph/CHANGELOG.md b/com.unity.shadergraph/CHANGELOG.md index f26543cd7ce..83cb85734cd 100644 --- a/com.unity.shadergraph/CHANGELOG.md +++ b/com.unity.shadergraph/CHANGELOG.md @@ -7,6 +7,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. ## [12.0.0] - 2021-01-11 ### Added + - Fixed bug where an exception was thrown on undo operation after adding properties to a category [1348910] (https://fogbugz.unity3d.com/f/cases/1348910/) - Added categories to the blackboard, enabling more control over the organization of shader properties and keywords in the Shader Graph tool. These categories are also reflected in the Material Inspector for URP + HDRP, for materials created from shader graphs. - Added ability to define custom vertex-to-fragment interpolators. - Support for the XboxSeries platform has been added. diff --git a/com.unity.shadergraph/Editor/Drawing/Blackboard/SGBlackboardCategory.cs b/com.unity.shadergraph/Editor/Drawing/Blackboard/SGBlackboardCategory.cs index 545f85969d8..c5811bbf649 100644 --- a/com.unity.shadergraph/Editor/Drawing/Blackboard/SGBlackboardCategory.cs +++ b/com.unity.shadergraph/Editor/Drawing/Blackboard/SGBlackboardCategory.cs @@ -292,6 +292,15 @@ void OnMouseDownEvent(MouseDownEvent e) OpenTextEditor(); e.PreventDefault(); } + else if (e.clickCount == 1 && e.button == (int)MouseButton.LeftMouse && IsRenamable()) + { + // Select the child elements within this category (the field views) + var fieldViews = this.Query(); + foreach (var child in fieldViews.ToList()) + { + this.AddToSelection(child); + } + } } internal void OpenTextEditor() @@ -664,12 +673,6 @@ public override void Select(VisualElement selectionContainer, bool additive) public override void OnSelected() { AddToClassList("selected"); - // Select the child elements within this category (the field views) - var fieldViews = this.Query(); - foreach (var child in fieldViews.ToList()) - { - this.AddToSelection(child); - } } public override void OnUnselected()