Hi,
i ve recently watched some videos concerning Widgets but now my question is, is it better to remove a widget or to set the visibility to collapsed? As far as i know, both does basically the same or am I missing something?
Can you tell me what is better?
I’m not sure, but if you have more than one widget, the one you set as invisible may still interfere with the others, if placed on top of them (you can’t interact with the widgets below) . I’d suggest you to always remove all the widget you do not need anymore.
If you need to use some values for the deleted widget,you may store the in some BP (i.e. Level BP).
Just as a way to keep things easy, I generally will use one set of blocks to see if a widget needs to be on screen or not, and then either create and add it to viewport, or remove it. See the picture below.
Of course you can change this to suit your game, but this keeps things tidy. For me, it has prevented a lot of yellow “!” warnings in playing. It ensures that if the widget should be shown, it is, but if it shouldn’t be shown, it is hidden. Plus it guarantees that you won’t run into issues with widgets being visible over others and them interfering that you can’t fix through bug testing.