Setting Animation Blueprint in Construction

I’m trying to design an NPC blueprint so that my designers can change the model and the animation in the editor. Right, now I have it set-up in the Construction Script to be able to set the SkeletalMesh in the editor, but I can’t seem to set it up to be able to set the Animation Blueprint in the editor.

The only nodes I can pull into the script is Set Anim Class, which doesn’t allow me to use an Animation Blueprint. Is there anything that needs to be done to make it work correctly? I’ve tried grabbing the class from the Public Animation Blueprint variable I made, but that didn’t seem to work. :frowning:

I’ve figured it out now. You have a make a generic “Object” variable, and have to make a note only to select Animation Blueprints. I was just thinking that there was a way to only make an Animation Blueprint variable be compatible. Thanks so much for the help. :slight_smile:

Animation Blueprint is a valid Blueprint class like any other Blueprint, which is parent of UAnimInstance, you should be able to pick your Animation Blueprint class in Set Anim Class as a default input.

Hi,
I’m trying to do something similar with my blueprints - the ability to change the skeletal mesh and associated animation blueprints on spawn.
I’ve included the most basic of tests which still are not showing the desired results.
Check it… when I equipped this actor to myself (weapon) it should set the animat instance class to the “MGA_Anim_BP2” but when I pause after equipping and check the fields, the animation field is still empty and the weapon’s animation bp is not being set. Like PQ, I can get the get/set skeletal mesh via interfaces fine (which I plan to do with this if I can get it working)

Thank you,

62544-none.png

Did you figure this out?

try to use Override animation data instead of Set anim instance class

2 Likes