How to select single direct sibling?

I am working with a model of a building, just the outer glass of it. There are a few thousand individual panes. The way the model is made is a bit annoying. For each pane there is an empty object with a child which is another empty object which has two children, one of these is the actual pane and the other is another empty object but its name is the unique identifier i need for the window object that is its sibling. I can select this object fine as i iterate through them numerically and use gameobject.Find("window number"); however i need to perform operations on the window not the name. How do i then select this sibling?

Im new to unity so dont know the syntax for these operations. I couldnt find a findsibling function so was thinking something along the lines of the child of this object’s parent that isn’t called what this object is called… Is this correct? Theres probably a simpler way though…

Just like you said, get the parent, then the other children with different names.

    foreach (Transform child in transform.parent) 
    {
        if (child.name != this.name)
        {
            Debug.Log ("Found sibling "+child.name);
            // work with child here
        }
    }

In case you know the sibling’s name you could use

transform.parent.Find(...

Thanks for that. got me started.

foreach (Transform child in temp.transform.parent.transform)
{
    if (child.name != str)
    {
        //do stuff
    }
}

where temp is the current game object and str the name of the current game object