Fixed bug with delete prefab where the prefabs were not being deleted from the correct instances

This commit is contained in:
srikappa
2021-05-13 14:11:47 -07:00
parent 67c3801d73
commit 76e8a0ef47
3 changed files with 30 additions and 17 deletions
@@ -403,9 +403,12 @@ namespace AzToolsFramework
AzToolsFramework::EntityIdList selectedEntityIds;
AzToolsFramework::ToolsApplicationRequestBus::BroadcastResult(
selectedEntityIds, &AzToolsFramework::ToolsApplicationRequests::GetSelectedEntities);
AzToolsFramework::ToolsApplicationRequestBus::Broadcast(
&AzToolsFramework::ToolsApplicationRequests::DeleteEntitiesAndAllDescendants, selectedEntityIds);
PrefabOperationResult deleteSelectedResult =
s_prefabPublicInterface->DeleteEntitiesAndAllDescendantsInInstance(selectedEntityIds);
if (!deleteSelectedResult.IsSuccess())
{
WarnUserOfError("Delete selected entities error", deleteSelectedResult.GetError());
}
}
void PrefabIntegrationManager::GenerateSuggestedFilenameFromEntities(const EntityIdList& entityIds, AZStd::string& outName)