I have created a system to spawn (construct) Editor Utility Button’s. Each button has a different image:
I want to be able to click these buttons and have an event print out what color the button is.
The number of buttons will be different, so I can’t manually create a button for each color. It also seems that I can’t pass a reference through the Bind Event to On Clicked
.
How can I do this? I preferably want to do all of this in a function:
- Spawn all buttons
- Add images with colors
- Bind button On Clicked Event (with a reference to the button).
- When I press any button, have it print the color of the images it contains.
Sounds really simple all of this? Well it isn’t, I must be doing something wrong, because I am nowhere to understanding how to get a bind event reference a button, or somehow get the button information / image color information.
Please help, I really can’t make sense of this.