Some issues about animation blueprint have just been discovered when I try to upgrade my 4.20 project to 4.23. And it turned out that those issues had caused some trouble to us.
As a result, it took me several days to dig into this issue, and something seems should be recorded. Hope this could help you some day.
When you try to open an
Animation Blueprint with a
Sub Anim Instance node in it, you may notice that the engine is frozen. And while you check the editor log, you see lots of:
FAnimNode_StateMachine: Bad machine ptr
And you may notice that the engine takes much more time to compile the
Animation Blueprint that have a
Sub Anim Instance node in it.
Now you may get the point: This issue is all about the
Sub Anim Instance node.
By modify the engine code, you can fix the issue once and for all.
FAnimInstanceProxy::InitializeRootNode function in the
You need to move
for (UStructProperty* Property : AnimClassInterface->GetAnimNodeProperties())
to the top of the
The final code looks like:
If you tend to keep consistent with the official engine, you need to follow these steps:
- Add following lines to your
This would prevent the engine from printing endless log to your console, which causing freeze.
- Open the Animation Blueprint, and locate the
Sub Anim Inputnode. This might take some time…
- Create a new
Sub Anim Inputnode and replace the old node with the new one.
- Revert those modifications from the
So that’s how we should fix this issue. Another blog would be post to record how I dig into this issue.