heartstone
(heartstone)
September 1, 2016, 7:48am
1
.h file:
UAnimationAsset* AnimationAsset;
class USkeletalMeshComponent* RoleMesh;
.cpp file:
RoleMesh->GetAnimInstance()->PlaySlotAnimationAsDynamicMontage(AnimationAsset, “entity”);
i got this ‘use of undefined type ‘UAnimInstance’’ when i compile it in 4.13, there is no problom before this version. what i can do?
Hey heartstone-
Did you add an include statement for the AnimInstance class? If you add `#include " Runtime/Engine/Classes/Animation/AnimationAsset.h" at the top of the .h file you should be able to compile the code.
Cheers
Derjyn
(Derjyn)
September 1, 2016, 11:40pm
3
I think you meant:
#include "Runtime/Engine/Classes/Animation/AnimInstance.h"
Tip for finding imports:
Go into the solution explorer and search for the unrecognized classname.
IF you find it, then all you have to do is:
Then start typing the import, looking at the suggestions and comparing to the folder structure you see
in the solution explorer.
For me, all my imports needed to be in the format:
#include “…/Relative/Path/To/WhateverClass.h”