Merge branch 'edit-prefab-button' of https://github.com/abrasivetroop/FlaxEngine into abrasivetroop-edit-prefab-button
This commit is contained in:
@@ -71,7 +71,7 @@ namespace FlaxEditor.CustomEditors.Dedicated
|
|||||||
var panel = layout.CustomContainer<UniformGridPanel>();
|
var panel = layout.CustomContainer<UniformGridPanel>();
|
||||||
panel.CustomControl.Height = 20.0f;
|
panel.CustomControl.Height = 20.0f;
|
||||||
panel.CustomControl.SlotsVertically = 1;
|
panel.CustomControl.SlotsVertically = 1;
|
||||||
panel.CustomControl.SlotsHorizontally = 2;
|
panel.CustomControl.SlotsHorizontally = 3;
|
||||||
|
|
||||||
// Selecting actor prefab asset
|
// Selecting actor prefab asset
|
||||||
var selectPrefab = panel.Button("Select Prefab");
|
var selectPrefab = panel.Button("Select Prefab");
|
||||||
@@ -81,6 +81,15 @@ namespace FlaxEditor.CustomEditors.Dedicated
|
|||||||
Editor.Instance.Windows.ContentWin.Select(prefab);
|
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
|
// Viewing changes applied to this actor
|
||||||
var viewChanges = panel.Button("View Changes");
|
var viewChanges = panel.Button("View Changes");
|
||||||
viewChanges.Button.Clicked += () => ViewChanges(viewChanges.Button, new Float2(0.0f, 20.0f));
|
viewChanges.Button.Clicked += () => ViewChanges(viewChanges.Button, new Float2(0.0f, 20.0f));
|
||||||
|
|||||||
Reference in New Issue
Block a user