Hello,
I have imported from blender a 3D object with animations(not a character).
I have created a blueprint animation class for it, to run the animations.
I have created a c++ pawn class, added a skeletal mesh component in there, and I need to set an anim class for that skeletal mesh.
The problem I am having is getting the blueprint animation class reference to assign it for the skeletal mesh.
I have tried everyhing that is mentioned in this post:
But none of the solutions work.
The problem I am facing is that if I am using Constructorhelpers::FObjectFinder, it always tells me that can not convert my type to UObject.
I have tried:
static ConstructorHelpers::FObjectFinder FooAnimBPObj(TEXT(“AnimBlueprint’/Game/GameObjects/ObjectsWithAnimation/TrapDoor/TrapDoorStateMachine.TrapDoorStateMachine’”));
and
static ConstructorHelpers::FObjectFinder FooAnimBPObj(TEXT(“UAnimBlueprintGeneratedClass’/Game/GameObjects/ObjectsWithAnimation/TrapDoor/TrapDoorStateMachine.TrapDoorStateMachine’”));
And both give me an error saying cannot convert argument from UAnimblueprintGeneratedClas or AnimBlueprint to UObject.
and then I would try to do (my skeletal mesh component name is TrapDoor)
TrapDoor->AnimClass = FooAnimBPObj.Object;
to set the animation class, so that I could switch animations.
Unfortunately I have been unable to set the blueprint animation class to the skeletal mesh. It was very easy to set in in a blueprint pawn class, but I can not get it done using c++