rotate a parent around a child

For some instances of a gameobjects, the children need to rotate around the parent gameobject.

But in some instances the parent gameobject needs to rotate around one of the child game objects.

Is there some function in Unity to allow this? or will it require all manual coding?

Check out transform.RotateAround.

awesome