make "Edit Prefab" not change content panel file path

If someone still wants to change the Content panel to the file path of the prefab, they can use the "Select Prefab" button
This commit is contained in:
xxSeys1
2024-10-09 18:25:04 +02:00
parent 9694446fca
commit 8b3f1ca019

View File

@@ -9,6 +9,7 @@ using FlaxEditor.CustomEditors.Elements;
using FlaxEditor.GUI;
using FlaxEditor.GUI.ContextMenu;
using FlaxEditor.GUI.Tree;
using FlaxEditor.Modules;
using FlaxEditor.Scripting;
using FlaxEditor.Windows;
using FlaxEditor.Windows.Assets;
@@ -87,9 +88,7 @@ namespace FlaxEditor.CustomEditors.Dedicated
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]);
Editor.Instance.Windows.ContentWin.Open(Editor.Instance.ContentDatabase.FindAsset(prefab.ID));
};
// Viewing changes applied to this actor