Do you know what delegate type I’d need to use if I wanted to pass the parameter from a blueprint function to a C++ blueprint function library method?
It appears as if under the hood UE uses TMulticastScriptDelegate/FMulticastScriptDelegate to represent a delegate added by dragging the node backwards. But I’m not able to compile when trying the below in a BPFL as UBT isn’t able to reconcile the delegate class type.
#pragma once
#include "CoreMinimal.h"
#include "UObject/ScriptDelegates.h"
#include "bpDelegateBPFL .generated.h"
UCLASS()
class VR_BASE_API UbpDelegateBPFL : public UBlueprintFunctionLibrary {
GENERATED_BODY()
public:
UFUNCTION(BlueprintCallable, Category = "Utilities|Delegate", meta = (DisplayName = "Foo (Delegate)", BlueprintThreadSafe))
static bool Foo(FMulticastScriptDelegate* bpDelegate);
UFUNCTION(BlueprintCallable, Category = "Utilities|Delegate", meta = (DisplayName = "Bar (Delegate)", BlueprintThreadSafe))
static bool Bar(TMulticastScriptDelegate* bpDelegate);
}