Extending EmotionFX in C++


Are you guys planning to provide an API to extend EmotionFX with custom C++ nodes? It looks like it should be relatively easy to do, except it does not link.

What I’m trying to do is to extend EMotionFX::AnimGraphNode and then register it with

EMotionFX::Integration::EMotionFXRequestBus::Broadcast(&EMotionFX::Integration::EMotionFXRequests::RegisterAnimGraphObjectType, objectTemplate);

Here is an example of one of link errors I’m getting:

TestStateNode.cpp.6441941.obj : error LNK2001: unresolved external symbol "public: virtual void __cdecl EMotionFX::AnimGraphObject::Update(class EMotionFX::AnimGraphInstance *,float)" (?Update@AnimGraphObject@EMotionFX@@UEAAXPEAVAnimGraphInstance@2@M@Z)

I’ve tried to link with both with EmotionFX and EmotionFXStaticLib - only can link with event bus, not AnimGraphObject. My current best bet is: it happens because no symbols are dll-exported.

Thank you

Hi @Sasha, I recently integrated an EMotionFX blend node into a Gem and the basic approach is this:

  • In your node’s .h file in your Gem include the EMotionFX/Source/AnimGraphNode.h header and extend EMotionFX::AnimGraphNode
  • In your node’s .cpp file include any other files from the EMotionFX/Source folder you may need like EMotionFX/Source/Node.h etc.
  • In the your gem’s dev/Gems/MyGem/Code/wscript ‘use’ EMotionFX like this:
   def build(bld):
file_list = ['my_gem.waf_files'],
use = ['EMotionFX'],

Run lmbr_waf configure and build. Let me know if that works for you, cheers!

Works like a charm, thank you @petrocket !