Nested slices are now detected, converted into prefabs, and the top-level prefab will get linked to the nested prefabs with the proper number of instances. However, the nested prefabs won't retain any of the slice override values or parent entity hierarchy. That will (hopefully) be added in a separate PR.
This also adds support for better relative source paths for nested prefabs. To support this, the tool now needs to connect/disconnect with the AssetProcessor to be able to turn a slice asset ID into a relative source path, so that nested templates can be looked up and converted correctly.
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.
- Uses ToolsApplication instead of ComponentApplication so that built-in Editor components are recognized and read in correctly
- Starts up all the DynamicModules immediately so that the System Components are activated, which registers asset handlers and allows asset references to serialize in correctly
- Adds a -specialization command-line flag to specify which project specialization to use (editor, game, etc)
- Removes the filter to ignore unknown classes since they should all now be "known"
- Adds a few gem autoload flags and a null thumbnail service so that Qt and Python systems can be skipped, as they aren't needed for the data conversions and would bring additional overhead and complications