How to enable fast path for custom animation node

I have removed all the UProperty except the link in the C++ code, but it still warns that the node uses blueprint to update. There is no values to update at all. Is there anything missed up in the code or something needs to configure?

Here is the C++ code of the Node

#pragma once

#include "CoreMinimal.h"
#include "UObject/ObjectMacros.h"
#include "Animation/AnimNodeBase.h"
#include "AnimNode_Sample.generated.h"

USTRUCT(BlueprintInternalUseOnly)
struct FAnimNode_Sample : public FAnimNode_Base
{
	GENERATED_USTRUCT_BODY()

public:
	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = Links)
		FPoseLink Pose;

public:

	// FAnimNode_Base interface
	virtual void Initialize_AnyThread(const FAnimationInitializeContext& Context) override
	{
		Pose.Initialize(Context);
	}
	virtual void CacheBones_AnyThread(const FAnimationCacheBonesContext& Context) override
	{
		Pose.CacheBones(Context);
	}
	virtual void Update_AnyThread(const FAnimationUpdateContext& Context) override
	{
		Pose.Update(Context);
	}
	virtual void Evaluate_AnyThread(FPoseContext& Output) override
	{
		Pose.Evaluate(Output);
	}
	virtual void GatherDebugData(FNodeDebugData& DebugData) override
	{
		Pose.GatherDebugData(DebugData);
	}
	// End of FAnimNode_Base interface

};
#pragma once

#include "CoreMinimal.h"
#include "AnimGraphNode_Base.h"
#include "AnimNode_Sample.h"
#include "AnimGraphNode_Sample.generated.h"


UCLASS()
class UAnimGraphNode_Sample : public UAnimGraphNode_Base
{
	GENERATED_BODY()

	UPROPERTY(EditAnywhere, Category = Settings)
	FAnimNode_Sample Node;
};

1 Like

Even I don’t know why, I have solved it by overriding CreateOutputPins() in the AnimGraphNode.

	virtual void CreateOutputPins() override {
		CreatePin(EGPD_Output, UAnimationGraphSchema::PC_Struct, FPoseLink::StaticStruct(), TEXT("LocalPose"));
	}