Here on Pre Construct loop for creating menu slots. I did like this many times without errors.
But this time, menu creates twice (even three time sometimes). I was sure this is error in my Inventory function (pure, above loop) but when I add debug slot with info about list/loop end, I see it start loop twice… adding slots again. For now solution is to add ‘Do once’ before loop, but before, in my case it was never required.
I miss something or bug? I lost some time with it being sure I made a mistake in the function;)
Hi there,
Is this duplication happening every time you open the inventory menu? It might be necessary to get wrap box 63, connect to “clear children” right after Pre-construct, then “remove do once”.
Not sure what those nodes on completed do, but it seems only for debugging, correct?
Menu shows on button click. Is specified inventory only Player. Here different container, but on inventory menu starts, and click to show menu is later -when you click Anyway, other cotnainer - removed from parent (on start, for other tests), have own button for click/open menu and other inventory defined, but here listed player inv twice.
And strange ‘Do Once’ helps, I never used it in Widgets before as I remember
I just ran into almost the same issue today… No idea what happened but Event Construct is firing twice. At a complete loss. Happed last night but was able to fix it by restarting PC and recreating the widget but now it happened again and my only fix is to have a do once on Event construct.
So basically what I am doing is interacting with an NPC that displays a shop widget. Confirmed that the interaction function is fire once but Event Construct fires twice. It WAS working and then next morning broken so idk…
I had the same problem. The second execution of the constructor called the method “Set Input Mode Game And Ui”. If you call it before adding a new widget to the slot. If you call it after, the constructor will work once. Or just do not pass the variable In Widget To Focus.