UI button class
Hi,
I have a scene with a map like candy rush, all the buttons load a different level, the buttons works in the same way:
When the level is locked I want to use a given sprite, when the level is not locked I want to use another sprite.
Ideally I am thinking of creating that script that is reading the variables and deciding which sprite to use, dragging that script on my button and that's it.
But how do I select the button on which the script is on? thanks for any advice!
The script is on the same GameObject than the Button ? Why don't you just use GetComponent() ?
Your answer
Follow this Question
Related Questions
How to change a button image with script? 1 Answer
UI Button Doesn't Render [C#] 0 Answers
Changing the image of a button with a script 1 Answer
Remove button OnMouseOver highlighting 0 Answers
UI buttons won't recognize script 0 Answers