Iterating through Stack Box Slots / Overlay Slots

Hello everyone,

is there a way to iterate thorugh the slots of for example a stack_box or an overlay like normal arrays to modify properties of the widget contained in the slot?

if(WidgetToHide := StackBox.Slots[0].Widget):

This doesn’t throw any error but when I try to set the visibility of WidgetToHide to Hidden nothing changes…

WidgetToHide.SetVisibility(widget_visibility.Hidden)

Thanks for your suggestions!

I feel like the code I have written above should be the way to go in the future but for now I create a new class for the widget in each slot with an index variable.
A (unnecessarily) complicated workaround but that is what you gotta do with beta software…