Bugfixes to enable slice-to-prefab conversion to run with less warnings/errors/crashes (#768)
While trying to process all slices and levels in Automated Testing, a few bugs came up that needed to be addressed: - [LYN-3832] TransformComponent had a field removed without updating the version number and converter, which caused a lot of excessive warnings - SliceComponent would crash in debug builds on instantiation failures due to a null dereference that was guarded against in most but not all places - SliceConverter now detects when nested slices exist and gracefully warns about it. - InstanceUpdateExecutor / TemplateInstanceMapper will now immediately remove instances that are unregistered, so that any in the queue don't get processed on a subsequent tick. This was causing crashes when the instance was destroyed before the processing occurred. It also has a side benefit of preventing the same instance from executing multiple times. - Minor logic bugfix to the pack close warning, the boolean check was flipped. Also added an early-out on SetTemplateId, since this was causing some unnecessary instance queue entries.
This commit is contained in:
+7
-1
@@ -162,6 +162,12 @@ namespace AzToolsFramework
|
||||
classElement.RemoveElementByName(AZ_CRC("InterpolateScale", 0x9d00b831));
|
||||
}
|
||||
|
||||
if (classElement.GetVersion() < 10)
|
||||
{
|
||||
// The "Sync Enabled" flag is no longer needed.
|
||||
classElement.RemoveElementByName(AZ_CRC_CE("Sync Enabled"));
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
} // namespace Internal
|
||||
@@ -1305,7 +1311,7 @@ namespace AzToolsFramework
|
||||
Field("IsStatic", &TransformComponent::m_isStatic)->
|
||||
Field("InterpolatePosition", &TransformComponent::m_interpolatePosition)->
|
||||
Field("InterpolateRotation", &TransformComponent::m_interpolateRotation)->
|
||||
Version(9, &Internal::TransformComponentDataConverter);
|
||||
Version(10, &Internal::TransformComponentDataConverter);
|
||||
|
||||
if (AZ::EditContext* ptrEdit = serializeContext->GetEditContext())
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user