Mesh->GetAnimInstance() returns NULL
I have the following problem:
I’ve created a custom UAnimInstance class called UHandAnimInstance
I’ve reparented my animation blueprint called AnimHandBP and set up both montages. So far it works perfectly.
I have my FirstPersonCharacter blueprint derived from my C++ class called ATheForestCharacter This character has a Mesh called HandAnim and there I’ve set up in the editor:
Animation Mode: Use Animation Blueprint
Anim Blueprint Generated Class: AnimHandBP_C
Please note that the mesh itself is created in C++ in a constructor of ATheForestCharacter like this:
Compiled / Saved etc.
Now back in my ATheForestCharacter I am trying to call method ShowPhoneLight() of the animation blueprint and here lies the problem:
This code always returns NULL into myHand.
Please note that even:
UAnimInstance* myHand = HandAnim->GetAnimInstance();
returns also NULL.
I’ve read many tutorials and threads and it sounds like the way to go so I believe I am missing something terrible obvious.
Any advice would be greatly appreciated.
asked Jun 17 '15 at 07:35 PM in C++ Programming
In my case "HandAnim" didn't have skeletal mesh assigned. Only the animation blueprint.
answered Jul 24 '15 at 01:08 PM
Nevermind - found a solution. You must have assigned skeletal mesh or this doesn't work.
answered Jun 17 '15 at 08:56 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here