Tasharen Entertainment Forum
Support => NGUI 3 Support => Topic started by: jeldrez on March 17, 2014, 01:05:42 PM
-
There's a way to change the color of several widgets at runtime?
I'm using white/light-grey assets so I add color using the widget property. But I'll like to change all the assets colors at the same time.
Example:
Change all widgets with this color to the next one:
Base) To)
R: 255 R: 150
G: 255 G: 200
B: 150 B: 150
A: 255 A: 255
Any help will be appreciated!
-
GetComponentsInChildren<UIWidget>() and iterate through them changing the color to what you want.
-
yeah, but I was thinking to change the color itself, like Black is not Black anymore it it's Yellow.
A colleague recommend me to use Tag to all the assets I want to change and then look for all of them and change ir looking for that specific tag. Apparently that's the approach.