How can I iterate through all the buttons in an UMG

Hi,

There might be a simple answer to this, but I can’t seem to find it.
Is there any way to go through each of the buttons of an UMG. I have an UMG that is called MtlsUMG, and I’d like to loop through all the buttons that are already placed in that UMG on event construct.

Thanks for any help.

I’ll assume that by UMG you mean a widget. You will need to create an array of type button and add the buttons manually, and then you can loop through them:

Alternatively, should you need to automate it a bit due to a huge number of child widgets to iterate through, you can query the containers:

3 Likes

Great! Thank you!