Remove links when deleting prefabs

This commit is contained in:
srikappa
2021-05-13 17:41:45 -07:00
parent 16b2dabde2
commit d8865a8f0d
@@ -708,6 +708,7 @@ namespace AzToolsFramework
for (auto& nestedInstance : instances)
{
RemoveLink(nestedInstance, commonOwningInstance->get().GetTemplateId(), currentUndoBatch);
nestedInstance.reset();
}
}
@@ -720,7 +721,7 @@ namespace AzToolsFramework
if (owningInstance->get().GetContainerEntityId() == entityId)
{
auto instancePtr = commonOwningInstance->get().DetachNestedInstance(owningInstance->get().GetInstanceAlias());
instancePtr.reset();
RemoveLink(instancePtr, commonOwningInstance->get().GetTemplateId(), currentUndoBatch);
}
else
{