Delegate signature mismatch

I’m trying to add a delegate in C++ for the OnClick event to my widget.

So I have the declaration:

DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam(FButtonClickedDelegate, UMenuButton*, Button);

UMenuButton is my custom widget.

Then I have the property;

  UPROPERTY(BlueprintAssignable, BlueprintCallable, Category = "UI")
  FButtonClickedDelegate OnButtonClicked;

The image above should be correct. But it’s giving me a signature mismatch error.

If I refresh the node, the error and the last pin goes away and it crashes during runtime.

I changed the signature of the delegate in C++. I think that may be the problem. Is there a way to fix this? I don’t want to use a different name for the delegate.

What does the tooltip say when you hover over the Button pin and the Self pin

They both say Menu Button Object Reference. I think that’s correct. The Button one is correct for sure. And the delegate is on the base class, so Menu Button makes sense there too.

If I duplicate the widget, the Button pin on my other delegates get changed to a reference to the Blueprint of the original, not the base class as defined by the delegate macro. And I never changed this delegate. I think my widget asset is completely corrupted.

I tried recreating the widget blueprint from scratch and the delegate call is missing the Button input. So I don’t know what to do.

Only thing that kind of works is renaming both the delegate type and property names. Even after that, I still get these warnings even though none of those names exist anymore.

I tried reparenting and reparenting back. There doesn’t seem to be a way to change delegate signatures after you use them the first time.

Clear bug in Unreal Engine where it won’t update delegate signatures changed in C++. I worked around it by recreating the widget from scratch and renaming the properties and delegates.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.