FAnimNode_BlendFaceFXAnimation broken on dynamically spawned actors
dpakatheman opened this issue · comments
This problem is caused by the LOD support patch:
06e3b61
In the LOD support patch, call of LoadFaceFXData() is moved from CacheBones_AnyThread() to Initialize_AnyThread(). However, when Initialize_AnyThread() is called, the actor instance of SladeBlueprintClass don't have FaceFXComponent yet. So BoneIndices is empty, but bFaceFXCharacterLoadingCompleted is true.
It is the source code inside FAnimNode_BlendFaceFXAnimation::LoadFaceFXData().
bFaceFXCharacterLoadingCompleted = true;
//generate the bone mapping indices out of the bone names
if(UFaceFXComponent* FaceFXComp = Owner->FindComponentByClass<UFaceFXComponent>())
If bFaceFXCharacterLoadingCompleted is true, LoadFaceFXData() is never called by FAnimNode_BlendFaceFXAnimation::EvaluateComponentSpace_AnyThread().
On the other hand, CacheBones_AnyThread() is called twice when the SladeBlueprintClass spawned. At the first call, it doesn't have FaceFXComponent yet too. But at the second call, it has.