Prefabs | Introduce sanitation of prefab doms on loading (#1929)
* Update PrefabLoader to sanitize ingested prefabs and have core systems operate with default values Signed-off-by: sconel <sconel@amazon.com> Signed-off-by: Danilo Aimini <82231674+AMZN-daimini@users.noreply.github.com> * Remove IsExplicitDefault implementation to avoid confusion (since the function isn't virtual). Avoid copying PrefabDoms over in SanitizeLoadTemplate. Signed-off-by: Danilo Aimini <82231674+AMZN-daimini@users.noreply.github.com> * Address naming and commenting concerns from PR reviews. Signed-off-by: Danilo Aimini <82231674+AMZN-daimini@users.noreply.github.com> * Fix to error detection code Signed-off-by: Danilo Aimini <82231674+AMZN-daimini@users.noreply.github.com> * Add support for all uuid formats for zero check. Signed-off-by: Danilo Aimini <82231674+AMZN-daimini@users.noreply.github.com> Co-authored-by: sconel <sconel@amazon.com>
This commit is contained in:
@@ -631,13 +631,16 @@ namespace AzToolsFramework
|
||||
//member itself, so we need to move instancesValue to the correct position for the next insert
|
||||
memberFound = instancesValue->get().FindMember(PrefabDomUtils::InstancesName);
|
||||
instancesValue = memberFound->value;
|
||||
instancesValue->get().SetObject();
|
||||
}
|
||||
else
|
||||
{
|
||||
instancesValue = memberFound->value;
|
||||
}
|
||||
|
||||
if (!instancesValue->get().IsObject())
|
||||
{
|
||||
instancesValue->get().SetObject();
|
||||
}
|
||||
// Only add the instance if it's not there already
|
||||
if (instancesValue->get().FindMember(rapidjson::StringRef(instanceAlias.c_str())) == instancesValue->get().MemberEnd())
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user