Shiped game with custom plugin crashes

I’ve never written a custom animation node myself, but glancing and the source it looks like it’s supposed to have an in-editor part based on UAnimGraphNode_Base, and a runtime part based on FAnimNode_Base. So you should have two modules, one for the editor and one for the runtime.

We create plugin with custom AnimNode. Project is runing and building correctly. But after shipping we got this error Screenshot - 554e67490583acdef8472c4d35dc1895 - Gyazo

Plugin Module Type set to Editor.

If we set Plugin Module as Runtime we cann’t build project becouse anim node using Editor classes (UnrealEd.h(54)…).

If we create Editor Module instead we got the same error with Linker, like in first case.

So, anybody have and idea what are we doing wrong?

Thank you! I’ll try it right now!

We devide our plugin into two parts and i think are on the right way. But now we have

error LNK2019: unresolved external symbol
while building editor.

Unfortunately I’m not omniscient, so if you want me to help you’ll need to provide the full error description.

Of course, thanks for your help! Here it is:
2>------ Skipped Build: Project: UE4, Configuration: BuiltWithUnrealBuildTool Win32 ------
2>Project not selected to build for this solution configuration
1> Parsing headers for AI_FlyEditor
1> Reflection code generated for AI_FlyEditor
1> Performing 3 actions (2 in parallel)
1> AI_FlyEditor.generated.cpp
1> AnimGraphNode_WeaponReduction.cpp
1> [3/3] Link UE4Editor-AI_FlyEditor.dll
1> Creating library C:\Users\Work_2\Documents\OnSteroidGames\AI_Fly\Intermediate/Build/Win64\UE4Editor\Development\UE4Editor-AI_FlyEditor.lib and object C:\Users\Work_2\Documents\OnSteroidGames\AI_Fly\Intermediate/Build/Win64\UE4Editor\Development\UE4Editor-AI_FlyEditor.exp
1>AnimGraphNode_WeaponReduction.cpp.obj : error LNK2019: unresolved external symbol “public: cdecl FAnimNode_WeaponReduction::FAnimNode_WeaponReduction(void)” (??0FAnimNode_WeaponReduction@@QEAA@XZ) referenced in function “public: cdecl UAnimGraphNode_WeaponReduction::UAnimGraphNode_WeaponReduction(class FObjectInitializer const &)” (??0UAnimGraphNode_WeaponReduction@@QEAA@AEBVFObjectInitializer@@@Z)
1>AI_FlyEditor.generated.cpp.obj : error LNK2001: unresolved external symbol “public: __cdecl FAnimNode_WeaponReduction::FAnimNode_WeaponReduction(void)” (??0FAnimNode_WeaponReduction@@QEAA@XZ)
1>C:\Users\Work_2\Documents\OnSteroidGames\AI_Fly\Binaries\Win64\UE4Editor-AI_FlyEditor.dll : fatal error LNK1120: 1 unresolved externals
1> -------- End Detailed Actions Stats -----------------------------------------------------------
1>ERROR : UBT error : Failed to produce item: C:\Users\Work_2\Documents\OnSteroidGames\AI_Fly\Binaries\Win64\UE4Editor-AI_FlyEditor.dll

You need to export your FAnimNode_WeaponReduction class from the module like so:

class AI_FLY_API FAnimNode_WeaponReduction

And add the module that contains FAnimNode_WeaponReduction to PrivateDependencyModules in the Build.cs of the module that contains your UAnimGraphNode_WeaponReduction.

Edit: Actually AI_FLY_API should match the module name, so it’d be something like YOURMODULE_API.

It is help! Now shipping failed:

We got this in Cook.txt

[2015.09.25-10.18.06:693][ 0]LogUObjectGlobals:Warning: Failed to load ‘/Script/EchoAnimationGraphNode’: Can’t find file ‘/Script/EchoAnimationGraphNode’ [2015.09.25-10.18.06:693][ 0]LogLinker:Warning: Can’t find file for asset ‘/Script/EchoAnimationGraphNode’ while loading


2015.09.25-10.18.06:733][ 0]LoadErrors: Info Failed to load /Script/EchoAnimationGraphNode.AnimGraphNode_WeaponReduction Referenced by EdGraphPin_15488 [2015.09.25-10.18.06:733][ 0]LogUObjectGlobals:Warning: Failed to load ‘/Script/EchoAnimationGraphNode’: Can’t find file ‘/Script/EchoAnimationGraphNode’ [2015.09.25-10.18.06:733][ 0]LogLinker:Warning: Can’t find file for asset ‘/Script/EchoAnimationGraphNode’ while loading …/…/…/…/…/…/Users/Work_2/Documents/OnSteroidGames/AI_Fly/Content/SideScroller/Blueprints/SideScrollerCharacter.uasset. [2015.09.25-10.18.06:733][ 0]LoadErrors: Info Failed to load /Script/EchoAnimationGraphNode.AnimGraphNode_WeaponReduction Referenced by EdGraphPin_15488 [2015.09.25-10.18.06:733][ 0]LogUObjectGlobals:Warning: Failed to load ‘…/…/…/…/…/…/Users/Work_2/Documents/OnSteroidGames/AI_Fly/Content/SideScroller/Blueprints/SideScrollerCharacter.uasset’: Can’t find file for asset ‘/Script/EchoAnimationGraphNode’ while loading …/…/…/…/…/…/Users/Work_2/Documents/OnSteroidGames/AI_Fly/Content/SideScroller/Blueprints/SideScrollerCharacter.uasset. [2015.09.25-10.18.06:733][ 0]LogLinker:Warning: CreateExport: Failed to load Outer for resource ‘EdGraphPin_8860’: AnimGraphNode_WeaponReduction /Game/SideScroller/Animations/SideScroller_AnimBP.SideScroller_AnimBP:AnimGraph.AnimGraphNode_WeaponReduction_1 [2015.09.25-10.18.36:417][ 0]LogWindows: === Critical error:
=== Fatal error!

We set Runtime Plugin Module as PreDefault (as mentioned here A new, community-hosted Unreal Engine Wiki - Announcements - Unreal Engine Forums) and everything builds successfully.

Thanks to enlight_2014

Also, we found nice wiki page about Graph Node A new, community-hosted Unreal Engine Wiki - Announcements - Unreal Engine Forums