From 20a25adcedc1456d44d5ab36119ba6b8112b5cce Mon Sep 17 00:00:00 2001 From: Reach Platform Support Date: Tue, 26 Sep 2023 11:26:41 +0000 Subject: [PATCH 01/16] [Port] [2023.1] [VFX] Prevent vfx toolbar buttons from keeping a highlighted border after click Repo steps: Open unity scene (HDRP) Right click project window > Create > Visual Effects > Visual Effect Graph Create a graph and name is anything Click the Question mark icon on the top left of the viewport The documentation page should open, navigate back to the unity project and notice the button is still selected by indication of the blue light Expected result: No selection left on button Actual result: Blue selection indicator on button Reproducible with: 2022.2.13f1, 2023.1.0b15, 2023.2.0a14 Cannot test with: 2020.3.46f1, 2021.3.21f1 (Due to functionality not existing) Platforms tested: Win 11 ![screenshot](https://jira.unity3d.com/secure/attachment/875249/UI%20Questionmark%20bug%20.png) --- .../Editor/GraphView/Views/DropDownButtonBase.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Packages/com.unity.visualeffectgraph/Editor/GraphView/Views/DropDownButtonBase.cs b/Packages/com.unity.visualeffectgraph/Editor/GraphView/Views/DropDownButtonBase.cs index 8584e6b600d..7fd08922452 100644 --- a/Packages/com.unity.visualeffectgraph/Editor/GraphView/Views/DropDownButtonBase.cs +++ b/Packages/com.unity.visualeffectgraph/Editor/GraphView/Views/DropDownButtonBase.cs @@ -50,6 +50,7 @@ protected DropDownButtonBase( } m_MainButton = new Button(OnMainButton) { name = mainButtonName }; + m_MainButton.focusable = false; m_MainButton.AddToClassList("dropdown-button"); m_MainButton.AddToClassList("unity-toolbar-toggle"); if (!string.IsNullOrEmpty(iconPath)) @@ -69,6 +70,7 @@ protected DropDownButtonBase( Add(separator); var dropDownButton = new Button(OnTogglePopup); + dropDownButton.focusable = false; dropDownButton.AddToClassList("dropdown-arrow"); dropDownButton.AddToClassList("unity-toolbar-toggle"); dropDownButton.Add(new VisualElement()); From 6c94d8ee427d23d8dfe84a827b10cbe828e77732 Mon Sep 17 00:00:00 2001 From: Reach Platform Support Date: Tue, 26 Sep 2023 11:26:42 +0000 Subject: [PATCH 02/16] [Port] [2023.1] [VFX] Disable blackboard [+] button on the "No asset" VFXView MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Jira: https://jira.unity3d.com/browse/UUM-28528 Steps to reproduce: - Open the VFX "No Asset" window (menu `Window`->`Visual Effects`->`Visual Effect Graph`) - If the blackboard is not opened, open an existing VFX (or create a new one) and open the blackboard, then close and reopen the "No Asset" window. - Click on the [+] button in the blackboard Unity_BOeC0iinDa => An error is thrown in the console The fix for this issue is to disable the [+] button for the "No Asset" window. Unity_leeT7chM2m ### 🎁 Gift improvement Looking at the screenshots above I noticed that the "Create new Visual Effect Graph" button was squashed when the window is too small. So I did a few changes to fix that. See the videos below. **Before** ![Unity_GP4bVeUqzN](https://media.github.cds.internal.unity3d.com/user/4003/files/13642625-3f18-4942-a871-3014df0b589d) **After** ![Unity_Y0k41vtIWt](https://media.github.cds.internal.unity3d.com/user/4003/files/1e5770cc-1916-480d-818d-1886e54af830) --- .../GraphView/Blackboard/VFXBlackboard.cs | 1 + .../Editor/GraphView/Views/VFXView.cs | 28 ++++++++----------- .../Editor/UIResources/uss/VFXView.uss | 14 ++++++++-- 3 files changed, 23 insertions(+), 20 deletions(-) diff --git a/Packages/com.unity.visualeffectgraph/Editor/GraphView/Blackboard/VFXBlackboard.cs b/Packages/com.unity.visualeffectgraph/Editor/GraphView/Blackboard/VFXBlackboard.cs index fba0b137b8a..a4ab79aa5fa 100644 --- a/Packages/com.unity.visualeffectgraph/Editor/GraphView/Blackboard/VFXBlackboard.cs +++ b/Packages/com.unity.visualeffectgraph/Editor/GraphView/Blackboard/VFXBlackboard.cs @@ -91,6 +91,7 @@ public VFXBlackboard(VFXView view) m_AddButton = this.Q