How can we Ship Games that use custom animation nodes?
Dear Friends at Epic,
Since we cannot include anything from the Editor Source,
How can we ship games that have custom animation nodes that we use in the editor in our Animation Blueprints?
I have to include Animgraph and BlueprintGraph in my private dependencies in order to get my custom animation nodes to work!
Specifically for the animgraph node
But these headers depend on UnrealEd, so when I go to ship my project it cannot compile UnrealEd.
So how do I build and use custom animation nodes?
You're allowed to extend and modify the editor however you want to in order to create your game, including adding your own custom anim graph nodes. But as you indicated, you are not allowed to ship anything that depends on our editor code. Luckily, there is no need to!
You should create a new game module inside your game project that will contain only editor-specific code. For example, if your primary game module is called "MyGame", you would create another module alongside it called "MyGameEditor". This module will contain all of your editor-specific stuff for your game, such as your custom anim graph node.
Then, edit your "MyGameEditor.Target.cs" file, and make sure that your "MyGameEditor" module is listed in the "ExtraModuleNames" in the SetupBinaries() function. This means that when compiling your game as an editor DLL, your game's special editor module will be compiled too.
Because your "MyGame.Target.cs" file does not list "MyGameEditor" as a dependency, your editor features will be omitted when compiling your actual shipping game.
This is the pattern that we use for all of our games here at Epic.
Follow this question
Once you sign in you will be able to subscribe for any updates here