I am working on a project (iOS) that requires me to have access to a particular button. I am creating several buttons using a FOR loop and using an array as its origin. Each array element has several variables that I use within the IF declaration of the button so I can give buttons functionality.
What I want to do are two things:
To be able to tap a particular button and change its background without changing the background of all the other buttons. I thought of using a toggle button, but it doesn’t work for what I am trying to accomplish. I tried adding a change of GUIStyle to the IF statement but it changes all other buttons with it.
I need to implement a Play functionality that basically “steps through” every button, each button changing background when it’s doing something and executing its function when it’s called.
Is there a way I can “tag” the buttons for me to access them individually later on in code? Is there a way to assign a name to a button to access it that way? Can you think of a way to achieve these things in a simpler way?
Thank you very much for the help!