Hello,
We recently updated Unreal to 5.8.2 and since then, we have an error when trying to assemble a Metahuman Character. The error is the following:
MetaHuman: Error: Cannot copy Common asset ‘CR_PlaceHolder’ an incompatible asset of type ‘/Script/ControlRig.ControlRigBlueprintGeneratedClass’ already exists at the target location. Remove or rename the conflicting asset and try again.
Looks like it comes from the piece of code added in 5.8 from MetahumanCharacterBuild.cpp CheckValidDependencyPackage() that now check on-disk class mismatch.
I think we had some issues related to that pre-5.8 and this is now catched by the code because when I take a look at our /Game/MetaHumans/Common/Animation folder, there are multiple CR_PlaceHolder assets (CR_PlaceHolder_1, CR_PlaceHolder_2, CR_PlaceHolder_3 and so on…).
By tinkering with the code, I managed to determine that the 4 following assets have the same issue when assembling a MetahumanCharacter:
/Game/MetaHumans/Common/Animation/CR_PlaceHolder
/Game/MetaHumans/Common/Common/MetaHuman_ControlRig
/Game/MetaHumans/Common/Face/CR_MetaHuman_HeadMovement_IK_Proc
/Game/MetaHumans/Common/Face/Face_ControlBoard_CtrlRig
They all share the same pattern:
* FMetaHumanCharacterEditorBuild::DuplicateDepedenciesToNewRoot calls UPackageTools::FindOrCreatePackageForAssetType.
* FindOrCreatePackageForAssetType uses the Asset Registry to get the Assets in the existing package, but it returns 2 assets.
[Image Removed]
* This sets bShouldGenerateUniquePackageName to true, which will create a new package with an unique name.
* Then in CheckValidDependencyPackage(), TargetPackage->GetName() != AssetPackagePath returns false, since TargetPackage has an unique id at the end of it’s package name.
* AssetRegistry.GetAssetsByPackageName() gets the two assets in the Package and prints the first one in the error log, despite the second one being the one of the same class of DependencyAsset->GetClass() we’re looking for.
[Image Removed]
The workaround I found is to force delete the four assets above, then execute the Assembly and it works. Metahuman re-create the packages, re-link the references and successfully complete the process. But then, when I re-save these four assets, the error “Cannot copy Common asset ‘CR_PlaceHolder’ an incompatible asset of type ‘/Script/ControlRig.ControlRigBlueprintGeneratedClass’ already exists at the target location.” comes back…
I also checked the Metahuman Character data in the plugin used to do the duplication, but they were not edited by accident on our side.
Do you have any idea on how to fix this issue ?
Thanks in advance,
Guillaume
[Attachment Removed]