Is adding Named Slots on Pre Construct not supported? are there alternatives?

I’m trying to create a Tab Menu UI, and was hoping to use Named Slots so that I can have custom content inside each tab. But Named Slots created and added on Pre Construct doesn’t appear when the Widget is added to another widget.

Manually placing multiple Named Slots in the Designer works as intended.

Is this a limitation?
Is there any workarounds?


Creating and adding Named Slots to Widget Switcher on Pre Construct.

image
No Named Slots available.

In the above example the switcher lives inside the Tab Menu, right? Plugging the switcher as Outer does not help?

2 Likes

Yes.

Like this?

It’s the same as before.

I guess UMG is not clever enough to figure this one out.

Do you know if the slots are actually there even though they do not show up? Not that this is the point of this exercise, but my bet is that if you tried fetching a child of the switcher run-time, the NS would probably be there.

It’s probably the designer that does not show them.


One last thing I’d try, would be to construct the NSs in the wDebugMenu and only then push them into the wTabMenu's switcher.

2 Likes

Yes, the slots are there just not visible in the Hierarchy.

I forgot to mention, the Slots doesn’t show up in wTabMenu’s Hierarchy either. So I would guess constructing them in wDebugMenu and adding it to wTabMenu wouldn’t work.

As you said, I think it’s a Designer limitation. Tried swapping out the NamedSlots for Buttons, the buttons do visually show up but doesn’t get added to the Hierarchy tab. Probably can’t add stuff to the Hierarchy through Pre Construct. Which I guess prevents the Named Slots from working.

As a workaround, I manually added 10 Named Slots. Probably won’t need more tabs than that. Kinda ugly but works.

2 Likes

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