Widget instances are being created even when not loaded

Hi Community,

I’m new using Unreal Engine, however I have plenty programing experience specially with POO, Usually I worry a lot about resource efficiency while programming, I’ve been playing with widgets and HUD last days, but found something that I can’t explain, I found modular HUD suits very well to my programming style, I’m creating a HUD that contains different character widgets that contains their ability slots and Icons, when I was debugging the widgets functionality I found that 2 extra instance of the same each widget where being loaded, i.e. I have this widget called WB_CharacterBox, it should only be 5 instance of those, but in the Blueprint Debugger there are like 15 of them, only 5 are loaded from my WB_MainHUD, my main HUD blueprint, after a while trying to find the source of the other 10 widgets I decided to remove the code that create and add to the view port this widget, the 5 instances from the created widgets where gone, but those 10 widgets instances are still being loaded, later on I delete the original WB_MainHUD blueprint, to clean up any reference and start over again, it work in the beggning, but as soon I created a new MainHUD widget, also changed the original name, WB_PlayerHUD, just in case, and added the 5 WB_CharacterBox, those 10 instances started to show up again.

I found that other Widgets containing other widgets inside had this behavior too, I tried to change HUD Class blueprint in game mode to none, removed every reference of every widget all around my game code, but this still happening.

I’m not sure if this kind of behaviors are intended, but in mt point of view, an instance of something shouldn’t be loaded just because it’s added to other inside other blueprint.


New WB_MainHUD

Blueprint Debugger, WB_MainHUD is not being created or loaded to viewPort


This is the code that created and added the viewport WB_MainHUD, actually I disconnected it from event begain play, and the HUD Class in my GameMode BP is set to None, the instances are stilll being created.