Why does transform.Rotate not move the sprite and BoxCollider2D together?

I want to Instantiate several square prefabs (arrow: BoxCollider2D.isTrigger = true), each rotated at 90 degrees around a central square prefab (engine: Rigidbody2D, BoxCollider2D, Script-see below) of the same size. The squares are each of side length 0.32.

22010-rotatebug1.png

My principle for achieving this is adding an empty GameObject gob to the engine that I then add the children to with an offset of 0.32, rotating gob after every instantiation of an arrow.

I use the following code inside a script attached to the engine prefab to instantiate the arrows.

	void Start ()
	{
		GameObject gob = new GameObject ();
		gob.transform.position = transform.position;		
		gob.transform.rotation = transform.rotation;
		gob.transform.parent = transform;
		//StartCoroutine("RotFix", gob);

		for (int i = 0; i < numAttractors; i++) 
		{
			GameObject att = (GameObject) Instantiate(Resources.Load<GameObject>("arrow"), gob.transform.position, gob.transform.rotation);
			att.transform.parent = gob.transform;
			att.transform.localPosition = new Vector3 (-0.32f,0f,0f);
			gob.transform.Rotate(0f,0f,90);

		}
	}

However the result shows me only one arrow: the first arrow, on the left. Turning on the gizmos view in the game window I can see that all the Boxcollider2Ds are where I expected them but the Sprite has not stayed with them:

22011-rotatebug2.png

Does anyone know why?

It appears that I had the notion slightly wrong about my transform tree:

My principle for achieving this is adding an empty GameObject gob to the engine that I then add the children to with an offset of 0.32, rotating gob after every instantiation of an arrow.

Should be amended: …adding an empty GameObject gob to the engine that I then add the children with an offset of 0.32, rotate gob after every instantiation of an arrow, then reparent the correctly positioned arrow to the engine. Then after all are completed Destroy the dummy object gob.

Solution code (replace from line 9-16 in original listing):

        for (int i = 0; i < numAttractors; i++) 
		{
			GameObject att = (GameObject) Instantiate(Resources.Load<GameObject>("arrow"), gob.transform.position, gob.transform.rotation);
			att.transform.parent = gob.transform;
			att.transform.localPosition = new Vector3 (-0.32f,0f,0f);
			att.transform.parent = this.transform;
			gob.transform.Rotate(0f,0f,90);
		}
		Destroy(gob);

Fiddling further shows that by adding a Rigidbody2D the original behavior goes away. That is to say: the sprite and BoxCollider2D move as one.

This appears to be is a Unity bug. I’ve filed a report: Bug report 590635