Animation blueprint switch desktop-crashes engine
Hi everyone, I have a question I am actually pulling my hair over. In our game we have lots of different animation blueprints, which we apply on main pc for various conditions (as opposed to a master animation gigablueprint which would have tons of nested state machines). Our approach however causes engine to desktop crash at times when it's necessary to switch ABP (not always but very often). Sometimes it helps to put delays after the ABP switch but I am not going this way since it would make the whole game unpredictable.
It boils down to this method:
specifically this line: if (SkeletalMesh && InAnimationMorphCurves && InAnimationMorphCurves->Num() > 0)
My main question is:
what is a preferred way to handle this? In our game we have lots of event specific animations (as opposed to a standard simple state machine). I have a feeling that we might be doing this all wrong otherwise nobody would be able to make an actual game. :)
I will be grateful for any advice how to approach this or for any idea how to workaround those crashes.
asked Jul 27 '16 at 01:53 PM in Bug Reports
It is a bit hard to gather the necessary info without seeing a stack trace, but the ApplyAnimationCurvesToComponent() function is called from the AnimInstance, i.e. the Animation Blueprint. So the fact you switched your AnimBP with another is causing issues for the original one, which seems to still be around.
What might help is to add a 0 second (aka single frame) delay. That way there isn't any unpredictable behavior and the previous AnimBP has time to clean up. Alternatively, you might want to see if there's a way to stop the previous AnimBP logic before switching to a new one.
answered Jul 27 '16 at 02:22 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here