Add custom event creates event with wrong input variables

When exporting a function from C++ to blueprint that has a delegate as parameter, the event created “on the fly” with “add custom event” creates an invalid event delegate.

Procedure:

1: Inside a Actor class, declare a delegate like this:

DECLARE_DYNAMIC_DELEGATE_OneParam(FTestDelegate, bool, Example);

2: Create an UFunction inside the Actor class

UFUNCTION(BlueprintCallable, Category="Test")
void TestCondition(FTestDelegate Condition);

3: Create a Blueprint class and call the previous function:

45346-imgbug1.png

4: In the condition parameter select “Add custom event”

45347-imgbug2.png

5: The blueprint, if compiled, will show an error because the signature doesn’t match

This newly created event’s input can’t be changed aswell.

The event that should’ve been created is the following:

45349-imgbug4.png

It’s not a bug, event does not suppose to add event arguments on there own, what context menu do when you grab a link is shows nodes with compatible input or output (“Add Event” is just one of them) and automatically plug the link you holding, node will act like it’s plugged link in to but node is not obligated to react to the link. Event is not program to automatically set fitting arguments, so it does not do that. So what you posted is more of a feature request (since that would be usefull either way) then bug report.

Hey

This functionality has been reported previously and a report has been submitted dealing with creating a custom event from a function with a delegate parameter (UE-16352).

Cheers