I’m updating my plugin from 5.4 to 5.5. Currently, other than some config issues, there have been no changes required. I experience a crash by hitting an assertion/check when loading a metahuman blueprint file.
My plugin creates an asset editor window and a persona preview scene. I then add either a single skeletal mesh or all skeletal meshes from a blueprint, to the preview scene as UDebugSkelMeshComponent. This is required as they have access to the preview instance to allow bone transform modifications.
When loading up a single mesh, everything is fine, however loading a metahuman blueprint, I experience a crash. This issue only happens if the face or torso/shirt mesh are included in my list. If both of these are excluded, or either are included by themselves, they work properly.
The crash appears to be an array out of bounds error from FBitReference operator(int32 Index). In debug mode, the index is always within the array limits, whilst still hitting the exception. This is called from SkeletalDebugRendering.cpp. This file does not appear to have been used when running my 5.4 plugin.
SkeletalDebugRendering is called from within FAnimationViewportClient::Draw(const FSceneView* View, FPrimitiveDrawInterface* PDI) which also doesn’t appear to be hit in 5.4. This function has a call to UpdateBonesToDraw() which uses the single (main?) preview mesh to get the required bones. These required bones are then used for all preview (debug) meshes in the scene.
I’m wondering if there is a bug here, where the required bones should be updated for each preview mesh? Alternatively, is there something that I’m doing wrong?