Re-parenting broken? Or am I missing something?

When I reparent a game object “A” to a new parent “B” (A.transform.parent = B.transform;)… Updates to B’s total matrix do not propagate to A. E.g., if the new parent moves around, game object A does not follow - its total matrix remains stale.

If I reparent A back to it’s original parent “C” - it correctly follows C around. E.g. if C’s total matrix changes, A’s total matrix is correctly recomputed.

This is fairly basic scenegraph stuff to get right. What gives? Is it broken? Or am I totally missing something - an additional step to reparent A to B?

If A is a child of B (which it is after you execute A.transform.parent = B.transform) A will follow B. If it doesn’t you might set B’s position somewhere. Keep in mind that .position sets the worldspace position and .localPosition sets the localspace position relative to the parent.