blueprints – UE5 C++ UBlueprintAsyncActionBase custom Node not available in editor-created BlueprintFunctionLibrary


I have created a Node (borgJsonForEachKey) that iterates over 1st level keys of my custom JSON implementation (UborgJson). The node works as expected in the Level blueprint editor.
I need to use this node in an editor-created BlueprintFunctionLibrary, but in the FunctionLibrary editor, my node is not available.

What do I need to change to make it available there?
I have run out of search terms and ideas.

borgJsonLoop.h

#pragma once

#include "borgJson.h"
#include "CoreMinimal.h"
#include "Kismet/BlueprintAsyncActionBase.h"
#include "borgJsonLoop.generated.h"

DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam(FDelayOutputPin, FString, Key);

UCLASS()
class MATRIX_API UborgJsonLoop : public UBlueprintAsyncActionBase
{
    GENERATED_UCLASS_BODY()

    public:
        UPROPERTY(BlueprintAssignable)
            FDelayOutputPin Loop;

        UFUNCTION(BlueprintCallable, meta = (BlueprintInternalUseOnly = "true"), Category = "borg-json")
            static UborgJsonLoop* borgJsonForEachKey(UborgJson* json_object);
        
        virtual void Activate() override;

    private:
        UborgJson* json_object;
};

borgJsonLoop.cpp

#include "borgJsonLoop.h"
#include "Engine/World.h"

UborgJsonLoop::UborgJsonLoop(const FObjectInitializer& ObjectInitializer) : Super(ObjectInitializer)
{
}

UborgJsonLoop* UborgJsonLoop::borgJsonForEachKey(UborgJson* json_object)
{
    UborgJsonLoop* Node = NewObject<UborgJsonLoop>();
    //Node->WorldContextObject = WorldContextObject;
    Node->json_object = json_object;
    return Node;
}


void UborgJsonLoop::Activate()
{
    TArray<FString> key_array;
    key_array = json_object->GetKeys();
    for (int32 i = 0; i != key_array.Num(); ++i)
    {
        FString IntAsString = FString::FromInt(i);
        Loop.Broadcast(key_array[i]);
    }
    FString IntAsString = FString::FromInt(0);
}

In the Level blueprint editor the node is available:

enter image description here
enter image description here

But not in my Function Library:

enter image description here



Source link

More To Explore

Share on facebook
Share on twitter
Share on linkedin
Share on email