Overriding on clicked event in widget is not working in 4.26.2

bwhhy
Tue, 06 Jul 2021 08:04:12 +0000
UI

Hi,

I just found that the on clicked event can not override in UE 4.26.2.

Here is related question I posted:

Unreal Engine Forums – 5 Jul 21

How to override the on clicked event in derived widget bp?

Hi, I have a user widget A that has a button with on clicked event. Then I created a blueprint B based on A and wish to override the execution steps triggered by the on clicked event. However, it always use the A version and none of the steps in B...

How to reproduce:

1. Create a Widget Blueprint “WidgetA”, add a button with on clicked event and print string “Base”

2. Create a New Blueprint "WidgetB"and in the popup window pick the parent class to “WidgetA”.

3. Override the on clicked event and print string “Derived”.

4. Add the widget in the viewport, and click the button.

In 4.24 or 4.25:
It will print “Derived” when WidgetB is created.

In 4.26.2:
It will print always “Base” no matter WidgetA or WidgetB is created.

And the extra finding in 4.26.2 is if I duplicate the WidgetA first to WidgetA_Dup, then in WidgetA_Dup, delete the items in designer hierarchy, manually change its parent to WidgetA, override the OnClicked will work.

4 posts - 1 participant