UMG WidgetSwitcher Bug or intended behaviour?

Hi everyone,

I have noticed a weird behavior of the widget switcher during debugging and monitoring using the blueprint debugger.

I use a widget switcher in my menu with a Widget called “Load Game Widget” to easily change my displayed widgets.

  1. Setup: Only LoadGameWidget + Spacer Widget

Screenshot 2022-08-31 083846

However, I noticed that upon starting the game, six instances of the “Load Game Widget” are created. A closer look using the debugger showed, that all instances except for one have some variable errors (variable value is [Unknown] (Class: [Unknown]))

After some more testing where I wasn’t able to get rid of the other instances, I added another widget to the widget switcher and suddenly more instances were created:

  1. Setup: LoadGameWidget + Spacer Widget + OptionsMenu
    Screenshot 2022-08-31 083821

After reverting everything back (I did not change any code or blueprint code!) it suddenly creates even more widgets :joy:

Did someone else also notice this behavior?
I am quite sure that this is caused by the widget switcher (but maybe I am wrong).

Is this an intended behavior/needed for the widget switcher to work properly?
Because it seems like a potential memory leak or at the least a serious bug.