UAnimInstance Not working?

I am trying this to play an animation on my character, but the compiler tells me AnimInst is of an undefined type, Why?

UAnimInstance* AnimInst = GetMesh()->GetAnimInstance();


if I leave the first line in there it compiles just fine, adding the second line gives me the error. Any ideas? including AnimInstance.h on top of my character cpp doesnt work either.

Do you have the include as?

#include "Animation/AnimInstance.h"

ha that did the trick, but why would it take the first line and not the second?

thanks for the fix, downloaded 4.11 to try and move the project over but no need right now

most likely because UAnimInstance is abstract declaration, at first line you just saying about variable type, at second line you are trying to access specific members but since it is abstract it doesn’t have one.

ah k that makes sense, I’m coming from udk so a lot of stuff is a blur to me