add edit prefab button

This commit is contained in:
Abra
2024-05-20 16:59:32 +03:00
committed by GitHub
parent 1bd1aca0f0
commit 4fb42319ef

View File

@@ -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));