A way to make SxxBoxes ignore invisible widgets ?

Hi,

In my game, I have a SHorizontalBox that store up to 4 or 5 widgets. At runtime, some of them are hidden because they are note needed, i.e. I just need 4 widgets or 2.

Right now I am just hiding the useless ones, but the box layout does not use the visibility. So if I remove the last widget of the box, I can see that the space is not reclaimed, widgets don’t move.

Is there a way to do that ?

Yep, use EVisibility::Collapsed rather than EVisibility::Hidden.