From d918991e273c982ac9d3bb0405453b1471d64d3a Mon Sep 17 00:00:00 2001 From: Mikhail Naumov <82239319+AMZN-mnaumov@users.noreply.github.com> Date: Fri, 21 Jan 2022 12:04:47 -0600 Subject: [PATCH] Allowing instantiating of prefab without selecting an entity in outliner (#6763) * Allowing instantiating of prefab without selecting an entity in outliner Signed-off-by: Mikhail Naumov * PR feedback Signed-off-by: Mikhail Naumov --- .../AzToolsFramework/UI/Prefab/PrefabIntegrationManager.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/UI/Prefab/PrefabIntegrationManager.cpp b/Code/Framework/AzToolsFramework/AzToolsFramework/UI/Prefab/PrefabIntegrationManager.cpp index bc65b9088b..d61efe0b6d 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/UI/Prefab/PrefabIntegrationManager.cpp +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/UI/Prefab/PrefabIntegrationManager.cpp @@ -341,7 +341,8 @@ namespace AzToolsFramework } // Instantiate Prefab - if (selectedEntities.size() == 1 && !readOnlyEntityInSelection && !onlySelectedEntityIsClosedPrefabContainer) + if (selectedEntities.size() == 0 || + selectedEntities.size() == 1 && !readOnlyEntityInSelection && !onlySelectedEntityIsClosedPrefabContainer) { QAction* instantiateAction = menu->addAction(QObject::tr("Instantiate Prefab...")); instantiateAction->setToolTip(QObject::tr("Instantiates a prefab file in the scene."));