How can i add buttons dynamically on my UMG Widget from a Structure? I’ve been messing around with this for hours and I cant seem to get it to work. I just want to add a new button on the struct any time and have it be available for selection and use. Am I fundamentally misunderstanding how UMG works?
Here’s how I’m trying to do it.
- Create Struct that holds buttons (easy enough)
- Create an actor that when overlapped will trigger an Icon (button) to appear on screen. This actor has the Struct as an array variable. I then take this array and use the get node to to get all the buttons. The get node has an integer variable, so I create an integer variable input. This input can select which button I want via the editor as it is editable within the editor. This is where i get stuck. How do you then bring these buttons to life (per say)?
- If I could then generate the buttons I would add then as children to a a UMG panel of some kind and have a second Struct that cared there style information.
Tell me what I’m doing wrong here.