Setting rotation of a bundle of parented objects by code

Hey!
When I have a bundle of parented objects and set the rotation of the parent object in the editor it chances the rotation AND the position of it. I guess that’s needed to keep all child objects rotation around a calculated center. And that’s what I need! Now here comes my simple question: How do I achieve this behaviour by code? Just setting for example the transform.eulerAngles of the parent object doesn’t do this trick.

Take a look at the CopyTransformRecurse() function in EnemyDamage.js in the 3D platform tutorial project - that recursively sets the transform for all childs of a gameobject.

Thanks! Transform.RotateAround works also very well for this purpose.