List actors in UMG

Hello.

I have an array of “props”

223978-06cd06324a9ec93144c069508432d570.png

and i want game to create buttons for each one of them like this:

223979-d52610132a518621f9750e646fc39750.png

and after each button press i want this to be called

Thank you.

Sorry for bad english im not a native speaker.

You have to create the button in a separate widget : create an Int called Index and make it visible (can be exposed on spawn if you choose to create the button manually). Put as many instances of the button on the main widget. Now get what you need from the button widget (cf picture). You have to Get all the buttons added in the main widget. Using Tick is fine but I would recommend using BP Interface.

Is there a way to automaticly create as many buttons as array lenght?

It should look something like this (the button index exposed on spawn)

I forgot, if all the buttons fire the same function, you will be able to call it inside button widget OnClicked, instead of using tick on the main widget.