Help with hiding childs

The following code is working and is basically taken from the reference. But how would I write if I wanted every child to get;" guiTexture.enabled = false;"…I tried around a bit but I only get errors :confused:

for (var child : Transform in createGUI.transform) {

        child.Translate(0, 10, 0);

    }

Also posted the question here: http://forum.unity3d.com/threads/127243-Help-with-hiding-childs

Try this:

for(var childTex : GUITexture in createGUI.GetComponentsInChildren.<GUITexture>())
{
    childTex.enabled = false;
}

well first you have to get those components. As far as I can tell from reading this link GetComponentInChildren you can get all the active components in the children with

using UnityEngine;
using System.Collections;

public class example : MonoBehaviour {
    public Component[] hingeJoints;
    void Example() {
        hingeJoints = GetComponentsInChildren<HingeJoint>();
        foreach (HingeJoint joint in hingeJoints) {
            joint.useSpring = false;
        }
    }
}

Now I am unsure as to script.DoSomething() does it for all of them or not. If it does it will do it to the parent as well so I think your code would look something like this

foreach (GUITexture gt in transform.GetComponentsInChildren<GUITexture>())
{
    if (gt.transform.parent != null)
    {
        gt.enabled = false;
    }

}

hope that’s what your looking for.