I am working with NGUI to set up flashy buttons in my game. But I hit a wall and I wanted to know how to do this. I have this code:
void Start()
{
foreach (GameObject x in GameObject.FindGameObjectsWithTag("ZoomInOut"))
{
x.GetComponent<UISprite>().enabled = false;
}
}
What this is, its instantiating my zoom in / zoom out buttons; and, sure enough it is making my button invisible but not the labels that are part of this object who happen to have the same component. So my question is how do I go on about disabling the child components? Many thanks in advance.