Download

Help Me With Dynamic Adding to Widget Switcher

I am trying to dynamically add a new widget to a widget switcher on an already created HUD. Yes, I can place it manually on the HUD itself, but I don’t want the HUD necessarily having an exact reference as to who called the add widget function. I was trying to use a BPI with an event Add Widget, placed the BPI on the HUD BP and created an Event using Add Widget that added a widget passed in, then in another BP, added the BPI, created a reference to the UMG I want to add and did a call message to the HUD, but the HUD wasn’t actually adding it. So I am a little confused.

The event is on the Base UMG BP
the function is part of the Base UMG
The created Widget Reference is from Other BP

Help would be appreciated and thank you in advance!

I was just going to ask the same thing, and it seems that widget switchers in Unreal is terribly under-developed:

bild

Are they only supposed to be static, like DataTables?

EDIT: Was just told to use the regular Add Child and then keep track of indexes myself. A bit manual, but works I guess.