I want to create basically a copy of this in code. I can get all the way to the Get AnimInstance part but cannot figure out which class to cast to to get the functionality of the cast in blueprints. Thank you for any help you can give you
/*what do i put here for type*/ *animInstance = Cast</*again*/>(mesh1P->GetAnimInstance);
Rama
(Rama)
May 13, 2014, 11:30pm
2
#Basic
//default anim class
if(mesh1P)
{
UAnimInstance* Animation = Cast<UAnimInstance>( mesh1P->GetAnimInstance() );
if(Animation)
{
Animation->Yay();
}
}
#Your Own Anim Instance Class
UMyAnimInstance* Animation = Cast<UMyAnimInstance>( mesh1P->GetAnimInstance() );
if(Animation)
{
Animation->Yay();
}
#My UE4 C++ Tutorials on Custom Anim Instance
wiki 1
After over a year in maintenance mode, the official Unreal Engine Wiki is now permanently offline. These resources now live on a new community-run Unreal Engine Community Wiki β ue4community.wiki! You will be able to find content from the official...
Reading time: 1 mins π
Likes: 14 β€
wiki 2
After over a year in maintenance mode, the official Unreal Engine Wiki is now permanently offline. These resources now live on a new community-run Unreal Engine Community Wiki β ue4community.wiki! You will be able to find content from the official...
Reading time: 1 mins π
Likes: 14 β€
TiagoLing
(TiagoLing)
July 23, 2015, 10:06pm
3
Iβm trying to do the same, based on your tutorials but i always get the AnimInstance as null - what am i missing?
same here, cast always fails
edit: ahhh it seems the mesh->GetAnimInstance() always return null for some reason⦠see here this guy has the same problem
link text
see this link someone has posted the answer
Answer