Apply change to all sub-elements

I have the element “filo” and i want to apply a change to all is sub-elements, there is a way to do that? For example if I have:

32921-immagine.png

public GameObject filo;
filo = GameObject.Find(“filo”);

How I hide the render of filo_1, filo_2 ecc. with a single operation? Is possible to do something like:

filo.renderer.enabled = false;

You could recurse through the hierarchy:

public static DisableRenderersRecursive(GameObject target)
{
    target.renderer.enabled = false;

    foreach (Transform transform in target.transform)
        DisableRenderersRecursive(transform.gameObject);
}