I’m getting to grips with the Blueprint Function Library system, and I’m trying to allow for developers to bind Blueprint functions to events on the Blueprint Function Library I’ve created. I’ve seen this functionality supported in places throughout the engine such as the Functional Testing Manager, however I haven’t quite worked out how to execute the events that I’ve defined.
For example, within the below code, I’ve created an ‘ExampleAssignable’ BlueprintAssignable property.
DECLARE_DYNAMIC_MULTICAST_DELEGATE_ThreeParams(FMyFunctionSignitureName, int32, Param1, int32, Param2, int32, Param3);
/**
*
*/
UCLASS()
class MY_PLUGIN_API UMyBlueprintFunctionCollection : public UBlueprintFunctionLibrary
{
GENERATED_BODY()
public:
UPROPERTY(BlueprintAssignable)
FMyFunctionSignitureName ExampleAssignable;
private:
};
How can I trigger the ExampleAssignable event? Aside from calling ExampleAssignable.Broadcast() within a non-static member function, which I’m in turn also puzzled as to how I could call if it’s not static, is there another valid way to do it? Is it possible perhaps to find a pointer to the Blueprint Function Library and access the property from within an external object?
Would love to hear any suggestions regarding best practices for this particular use case.
Thanks!