Recently updated to 4.17 to take advantage of a unrelated feature and found that I was getting a crash when handling the deaths of units in our game. Whenever a pawn dies I was calling the skeletal mesh components RefreshBoneTransforms so that even if the pawn was offscreen the bones would get updated and then I could successfully call the PoseableMeshComponent->CopyPoseFromSkeletalComponent( USkeletalMeshComponent* mesh ); to create our cheaper to render corpses.
This now instead crashes inside of the USkeletalMeshComponent::PostAnimEvaluation when it detects that there is recursion with the bPostEvaluatingAnimation boolean.
Not sure what I can do here now is there another way I can update the bones for a mesh which is offscreen so that all my corpses don’t show up as T-Poses?
And no I do not want to make all my characters update their animations while not in the camera frustum please.
For now I am just going to do the same and where I call the refresh will wrap it in the inverse define (#if DO_CHECK which should be false in shipping) that this crash occurs within so that for now, my editor corpses will be t-pose but my shipping ones shouldn’t be.
What my suggestion for this problem would be tho, would be that the UPoseableMeshComponent would make sure that a USkeletalMeshComponent was up to date before it copied the bones within the CopyPose function. Just my thoughts on what would be the cleanest solution for this problem although I could understand there might be a situation where the animation did NOT want to be up to date maybe after ragdoll or something? Don’t know have not touched any ragdoll stuff in over 10 years.