How to find parent of game object without a name?

How do I get a reference to a gameoject's parent gameobject when it is not possible to know the name of the parent?

(This occurs because I have several prefabs that contain a 'Switch' object, and I wish to know the immediate parent of that 'Switch', which may be one of several types.)

(transform.root is not a solution. I must know the parent)


You could use Transform.parent.

I need this answer, too

Could you find somethings about this issue?