From 4fb42319efea7b835b70af474b637b3334360adb Mon Sep 17 00:00:00 2001 From: Abra <47716519+abrasivetroop@users.noreply.github.com> Date: Mon, 20 May 2024 16:59:32 +0300 Subject: [PATCH 1/2] add edit prefab button --- Source/Editor/CustomEditors/Dedicated/ActorEditor.cs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Source/Editor/CustomEditors/Dedicated/ActorEditor.cs b/Source/Editor/CustomEditors/Dedicated/ActorEditor.cs index 1f2211571..166c6931e 100644 --- a/Source/Editor/CustomEditors/Dedicated/ActorEditor.cs +++ b/Source/Editor/CustomEditors/Dedicated/ActorEditor.cs @@ -81,6 +81,15 @@ namespace FlaxEditor.CustomEditors.Dedicated Editor.Instance.Windows.ContentWin.Select(prefab); }; + // Edit selected prefab asset + var editPrefab = panel.Button("Edit Prefab"); + editPrefab.Button.Clicked += () => + { + Editor.Instance.Windows.ContentWin.ClearItemsSearch(); + Editor.Instance.Windows.ContentWin.Select(prefab); + Editor.Instance.Windows.ContentWin.Open(Editor.Instance.Windows.ContentWin.View.Selection[0]); + }; + // Viewing changes applied to this actor var viewChanges = panel.Button("View Changes"); viewChanges.Button.Clicked += () => ViewChanges(viewChanges.Button, new Float2(0.0f, 20.0f)); From b2fc5e8fd345edaac4fbf9541431764f3bad0f6f Mon Sep 17 00:00:00 2001 From: Abra <47716519+abrasivetroop@users.noreply.github.com> Date: Mon, 20 May 2024 17:01:07 +0300 Subject: [PATCH 2/2] increase horizontal slot amount --- Source/Editor/CustomEditors/Dedicated/ActorEditor.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/Editor/CustomEditors/Dedicated/ActorEditor.cs b/Source/Editor/CustomEditors/Dedicated/ActorEditor.cs index 166c6931e..b88aeb7ad 100644 --- a/Source/Editor/CustomEditors/Dedicated/ActorEditor.cs +++ b/Source/Editor/CustomEditors/Dedicated/ActorEditor.cs @@ -71,7 +71,7 @@ namespace FlaxEditor.CustomEditors.Dedicated var panel = layout.CustomContainer(); panel.CustomControl.Height = 20.0f; panel.CustomControl.SlotsVertically = 1; - panel.CustomControl.SlotsHorizontally = 2; + panel.CustomControl.SlotsHorizontally = 3; // Selecting actor prefab asset var selectPrefab = panel.Button("Select Prefab");