Initial draft for getting instantiation to work immediately after creation is undone

This commit is contained in:
srikappa
2021-05-07 16:21:23 -07:00
parent a7624bb985
commit eb8084d3f6
14 changed files with 88 additions and 34 deletions
@@ -583,7 +583,7 @@ namespace AzToolsFramework
const TemplateId& linkTargetId,
const TemplateId& linkSourceId,
const InstanceAlias& instanceAlias,
const PrefabDomReference linkPatch,
PrefabDom linkPatch,
const LinkId& linkId)
{
if (linkTargetId == InvalidTemplateId)
@@ -667,9 +667,9 @@ namespace AzToolsFramework
rapidjson::StringRef(PrefabDomUtils::SourceName), rapidjson::StringRef(sourceTemplate.GetFilePath().c_str()),
newLink.GetLinkDom().GetAllocator());
if (linkPatch && linkPatch->get().IsArray() && !(linkPatch->get().Empty()))
if (linkPatch.IsArray() && !(linkPatch.Empty()))
{
m_instanceToTemplatePropagator.AddPatchesToLink(linkPatch.value(), newLink);
m_instanceToTemplatePropagator.AddPatchesToLink(AZStd::move(linkPatch), newLink);
}
//update the target template dom to have the proper values for the source template dom