(URGENT) Activating/Deactivating GameObjets with buttons (NGUI)

Hello everyone! I need some help because I’m new into c# :smile:. I need some buttons to acivate and deactivate multiple gameobjects.

As you can see below there are two parents: “Menu” and “Pantallas”. “Menu” contains each button and “Pantallas” contains sprites.

I need Mapa_btn to deactivate all Pantallas’ gameobjects but Mapa which has to be active. Any thoughts?

Add this script to Pantallas object. It should work:

GameObject[] allChildren;

void Start()
{
   allChildren = GetComponentsInChildren<GameObject>(); // find by code or add objects in Inspector
}

void ActiveChildren(bool show) //  you can active and deactive in one function
{
   foreach(GameObject child in allChildren)
   {
      if(child.name != "Mapa") { child.SetActive(show); }
   }  
}