0
\$\begingroup\$

I want to play my UAnimMontage via C++, and in particular, want to make use of the conveniences of UPlayMontageCallbackProxy.

Looks like in theory, I can use UPlayMontageCallbackProxy::CreateProxyObjectForPlayMontage, but anytime I use it, I just get linker errors:

0>YCharacterVaulting.cpp.obj: Error LNK2019 : unresolved external symbol "public: void __cdecl UPlayMontageCallbackProxy::PlayMontage(class USkeletalMeshComponent *,class UAnimMontage *,float,float,class FName)" (?PlayMontage@UPlayMontageCallbackProxy@@QEAAXPEAVUSkeletalMeshComponent@@PEAVUAnimMontage@@MMVFName@@@Z) referenced in function "public: void __cdecl UYCharacterVaulting::Traverse(void)" (?Traverse@UYCharacterVaulting@@QEAAXXZ)

I’ve already updated my Build.cs so that the module is included:

PrivateDependencyModuleNames.AddRange(new string[] {"AnimGraphRuntime", "MotionWarping"});

Any ideas on how I can fix the linker error? Thank you!

\$\endgroup\$

1 Answer 1

0
\$\begingroup\$

I never used the UPlayMontageCallbackProxy but Error LNK2019 usually means you are lacking the include.

Looking at the docs, you should add #include "PlayMontageCallbackProxy.h" to your file (as well as the AnimGraphRuntime Module that you already have in the Build.cs).

Is the include added to your file? If so, could you share the function you are using?

\$\endgroup\$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .