I have created custom animation node. I placed AnimNode to ingame module and AnimGraphNode to editor-only module. I deployed custom animation node to animation blueprint and saved it. But When I restart editor, Custom animation node has been deleted. (Node wasn’t show up in the animation blueprint.)
[Deploy and Save]
[Restarted editor]
[MyGame.Build.cs]
public class MyGame : ModuleRules
{
public MyGame(ReadOnlyTargetRules Target) : base(Target)
{
PCHUsage = PCHUsageMode.UseExplicitOrSharedPCHs;
PublicDependencyModuleNames.AddRange(new string[]
{
"Core",
"CoreUObject",
"Engine",
"OnlineSubsystem",
"OnlineSubsystemUtils",
"AssetRegistry",
"NavigationSystem",
"GameplayTasks",
"InputCore",
"UMG",
"AIModule",
"Slate",
"SlateCore",
"AnimGraphRuntime"
});
}
}
[MyGameEditor.Build.cs]
public class MyGameEditor : ModuleRules
{
public MyGameEditor(ReadOnlyTargetRules Target) : base(Target)
{
PCHUsage = PCHUsageMode.UseExplicitOrSharedPCHs;
bFasterWithoutUnity = true;
PublicDependencyModuleNames.AddRange(new string[] { "Core", "CoreUObject", "Engine", "InputCore", "MyGame", "AnimGraph", "BlueprintGraph" });
//Only if you created the Public and Private folder paths
PublicIncludePaths.AddRange(
new string[]
{
"MyGameEditor/Public"
});
PrivateIncludePaths.AddRange(
new string[]
{
"MyGameEditor/Private"
});
}
}
[MyGameEditor.Target.cs]
public class MyGameEditorTarget : TargetRules
{
public MyGameEditorTarget(TargetInfo Target) : base(Target)
{
Type = TargetType.Editor;
ExtraModuleNames.AddRange( new string[] { "MyGame", "MyGameEditor" } );
}
}
[MyAnimGraphNode_Recoil.h]
UCLASS()
class MYGAMEEDITOR_API UMyAnimGraphNode_Recoil : public UAnimGraphNode_SkeletalControlBase
{
GENERATED_BODY()
public:
UPROPERTY(EditAnywhere, Category = Settings)
FMyAnimNode_Recoil Node;
// UEdGraphNode interface
virtual FLinearColor GetNodeTitleColor() const override;
virtual FText GetTooltipText() const override;
virtual FText GetNodeTitle(ENodeTitleType::Type TitleType) const override;
virtual FString GetNodeCategory() const override;
// UAnimGraphNode_SkeletalControlBase interface
virtual FText GetControllerDescription() const override;
virtual const FAnimNode_SkeletalControlBase* GetNode() const override { return &Node; }
// End of UAnimGraphNode_SkeletalControlBase interface
private:
/** Constructing FText strings can be costly, so we cache the node's title */
FNodeTitleTextTable CachedNodeTitles;
};