Is there a way to spawn new buttons in a widget during the game
So Im working on an RTS game, and im trying to set up a widget blueprint that will create a new tab for each npc that gets added to the game. For the time being, im just trying to set this up with buttons, but it has proved to be way more difficult than i thought. Im trying to just make an array that will find all actors of class NPC, then create a button for each one, as children of a vertical box. Ive got the first part down, but, that only seems to help me if i were actually getting or setting data from them, which i am not. I have been able to create one button , but i cant get it to work after the first one. The only way i can think of going about this is making a variable for each character, and since there does not seem to be any way to create variables during the game, does anybody have any ideas on how i can go about making this work?
asked Mar 31 '16 at 08:34 PM in Using UE4
Any update？ I'm working on a similar function right now. My solution is to create another widget class, which has an only button, in a vertical box as a child.
It worked with mouse. But new widget cannot work with gamepad because it's not just a button but a widget.
answered Nov 02 '16 at 06:27 AM
Follow this question
Once you sign in you will be able to subscribe for any updates here