How can I use the animation blueprint I stored in a data asset to set the anim instance class of a newly spawned actor?

I am working on a simple prototype to learn how to wield data assets.

In this prototype, I am trying to spawn as many Player Character actors as I have data assets derived from a primary data asset that holds information such as a name, a static mesh and an animation blueprint. The end objective is to see if I can save myself the trouble of having to generate many Player Character assets and having to manually apply the appropriate data asset to each of them, creating a maintainability nightmare.

I can retrieve my primary data asset no problem, I can set a new name and a new static mesh on my Player Character and everything works as intended. The issue comes when I try to use the Animation Blueprint objects stored in my data assets. Simply dragging the node to ‘Get Class’ of the object and hooking that up to the ‘Set Anim Instance Class’ does nothing and I am at a complete loss as to how to proceed after a couple hours of google-fu and trying things out .

Any help is much appreciated, take care and have a good day.

Shouldn’t PlayerCharacterAnimBP be a Class Reference variable instead of Object Reference ?

image

1 Like

That was indeed the issue, the variable in my primary data asset was an object reference of an ‘AnimBlueprint’, changing that variable to a class reference of an ‘AnimInstance’ solved the problem.

Thank you kindly, much appreciated!

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.