How can I change the UI button color when clicked
Hello, I would like to do a switch to turn off and on the music of a videogame and y would like to set the button color in red when the music is off. I am using the new UI sistem so the button is the child of a canvas.
If you have a better solution please tell it to me, i would be very thansful.
Thank you, see ya
Comment
Answer by MrYOLO · Feb 25, 2016 at 03:18 AM
you can simply call this YourButton.image.color = ColorYouWant once you get the button clicked event.
Your answer
Follow this Question
Related Questions
How do I catch a click on a non-interactable button? 1 Answer
UI Button not working? 0 Answers
UI buttons don't work with Canvas Render Mode: Screen Space - Camera. 2 Answers
UI in World Space doesn't respond 1 Answer
Button custom collider 0 Answers