UMG: Replacing a widget with a child of a type with a variable creates hundreds of unwanted variables

When you create a widget component - of a type that comes with a variable by default - under another component, and then replace that parent component with its child, a large number of unwanted duplicate variables are created.
The examples below all use Named Slot, but the same issue will also occur with other types of widget component, such as Images, ComboBoxes, and so on.
It does not appear to happen for widget types that do not have a variable enabled by default, such as Texts.

Steps to reproduce:

  1. Create a new widget
  2. Drag a Named Slot component underneath the default Canvas Panel
  3. Right-click on the Canvas Panel and select Replace With->Replace With Child
  4. Switch to the Graph view

Expected Result:

  • There should be one variable for the Named Slot

Actual Result:

  • There will be a large number of variables of type “Named Slot”, named NamedSlot_1, NamedSlot_2, etc.

Notes:

  • The number of variables created appears to depend on how long the context menu was left open before selecting “Replace With Child”. I left the window open for ten minutes with the context menu open and the mouse hovering over “Replace With Child”, and it created over 60,000 variables when I finally clicked it.

Hello,

We’ve recently made a switch to a new bug reporting method using a more structured form. Please visit the link below for more details and report the issue using the new Bug Submission Form. Feel free to continue to use this thread for community discussion around the issue.

https://forums.unrealengine.com/unreal-engine/announcements-and-releases/1410408-unreal-engine-bug-submission-form

Thanks

Thanks, I posted the bug using that new system.

This was raised in the bug tracker and as UE-54054