Split editor entity activation from PrefabSystemComponent (#6787)

* Split editor entity activation from PrefabSystemComponent

Signed-off-by: srikappa-amzn <82230713+srikappa-amzn@users.noreply.github.com>

* Fixed a small typo

Signed-off-by: srikappa-amzn <82230713+srikappa-amzn@users.noreply.github.com>

* Pass entity activation callback during prefab instantiation for failing tests

Signed-off-by: srikappa-amzn <82230713+srikappa-amzn@users.noreply.github.com>
This commit is contained in:
srikappa-amzn
2022-01-11 16:53:46 -08:00
committed by GitHub
parent 73419387c5
commit 13bc91aa77
6 changed files with 81 additions and 18 deletions
@@ -79,7 +79,14 @@ namespace UnitTest
// verify template updated correctly
//instantiate second instance for checking if propogation works
AZStd::unique_ptr<Instance> secondInstance = m_prefabSystemComponent->InstantiatePrefab(templateId);
AZStd::unique_ptr<Instance> secondInstance = m_prefabSystemComponent->InstantiatePrefab(
templateId, AZStd::nullopt,
[](const AzToolsFramework::EntityList& entities)
{
AzToolsFramework::EditorEntityContextRequestBus::Broadcast(
&AzToolsFramework::EditorEntityContextRequests::HandleEntitiesAdded, entities);
});
ASSERT_TRUE(secondInstance);
ValidateInstanceEntitiesActive(*secondInstance);