UMG nested named slots not working

  1. Create a UMG Widget_A, add an overlay to it, add a named slot Slot_A to it.
  2. Create a UMG Widget_B, with Widget_A as parent, add an overlay to it then add a named slot Slot_B.
  3. Create another widget Widget_Main, add it to viewport of the game.
  4. Add Widget_A to Widget_Main, add a text block into the named slot, run the game - everything is OK.
  5. Add Widget_B to Widget_Main, add a text block into the named slot, run the game - NOT OK, text is not visible.

Everything is illustrated in the attached video.
This seems like a bug to me. Or is this working as intended?

The bug here is that unless something changed drastically, this should not even compile. Last time I checked it was not supported to have a UserWidget with a widget hierarchy if its parent UserWidget has a hierarchy. It would make no sense as there is no point in the tree to connect one tree leaf to another’s root.

There is a possible solution to your widget hierarchy problem. Create 1 layout hierarchy (all named slots and containers, no style, no content), then load that layout wherever you need to fill it with widgets. Don’t use it as a parent class.

1 Like