I have created a widget that dynamically spawns all the buttons required. I am now trying to get each button to set the information required.
issues im facing.
when pressing the button it only gives me the information for the last spawned button
if i add each spawned button to an array it just gives me all the buttons information all at once when I’m only after one button. ive looked at other discussions but none of them have been helpfull
You need to create your own class child of the button, in which you need to add a delegate with a parameter (a reference to itself, or an ID that you set after creating a button in the loop), which will allow you to understand which button exactly triggered the event.
I’m not 100% sure what you mean? I have asset a printstring per button which tells me which button is being pressed but im unsure how to get this information in the widget screen