Dont show Select prefab, Edit prefab, and view changes buttons when editing actor in the prefab.

This commit is contained in:
Chandler Cox
2024-06-18 21:10:42 -05:00
parent 0d8691045b
commit f38df259a7

View File

@@ -67,6 +67,8 @@ namespace FlaxEditor.CustomEditors.Dedicated
// Use default prefab instance as a reference for the editor
Values.SetReferenceValue(prefabInstance);
if (Presenter == Editor.Instance.Windows.PropertiesWin.Presenter)
{
// Add some UI
var panel = layout.CustomContainer<UniformGridPanel>();
panel.CustomControl.Height = 20.0f;
@@ -93,6 +95,7 @@ namespace FlaxEditor.CustomEditors.Dedicated
// Viewing changes applied to this actor
var viewChanges = panel.Button("View Changes");
viewChanges.Button.Clicked += () => ViewChanges(viewChanges.Button, new Float2(0.0f, 20.0f));
}
// Link event to update editor on prefab apply
_linkedPrefabId = prefab.ID;