From cf44d6580df708505feb34058efadf4f0e925ad5 Mon Sep 17 00:00:00 2001 From: Chandler Cox Date: Mon, 18 Mar 2024 18:50:53 -0500 Subject: [PATCH 1/2] Remove widgets when EnableSelecting is false. --- Source/Editor/Gizmo/UIEditorGizmo.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/Editor/Gizmo/UIEditorGizmo.cs b/Source/Editor/Gizmo/UIEditorGizmo.cs index 5d1f27651..ea4b75d28 100644 --- a/Source/Editor/Gizmo/UIEditorGizmo.cs +++ b/Source/Editor/Gizmo/UIEditorGizmo.cs @@ -507,7 +507,7 @@ namespace FlaxEditor { if (IsValidControl(selection[i], out var controlActor)) { - DrawControl(controlActor, controlActor.Control, true, ref mousePos, ref drawAnySelectedControl, true); + DrawControl(controlActor, controlActor.Control, true, ref mousePos, ref drawAnySelectedControl, EnableSelecting); } } } From 4b9bfc5bb4318af84eaece7768c6ae4d739d10e7 Mon Sep 17 00:00:00 2001 From: Chandler Cox Date: Mon, 18 Mar 2024 18:58:59 -0500 Subject: [PATCH 2/2] Allow to still show widget in prefabs when in play mode --- Source/Editor/Gizmo/UIEditorGizmo.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/Editor/Gizmo/UIEditorGizmo.cs b/Source/Editor/Gizmo/UIEditorGizmo.cs index ea4b75d28..e39bd2684 100644 --- a/Source/Editor/Gizmo/UIEditorGizmo.cs +++ b/Source/Editor/Gizmo/UIEditorGizmo.cs @@ -507,7 +507,7 @@ namespace FlaxEditor { if (IsValidControl(selection[i], out var controlActor)) { - DrawControl(controlActor, controlActor.Control, true, ref mousePos, ref drawAnySelectedControl, EnableSelecting); + DrawControl(controlActor, controlActor.Control, true, ref mousePos, ref drawAnySelectedControl, EnableSelecting || (!EnableSelecting && Parent?.Parent is not Windows.GameWindow)); } } }