For example, we assume the following structure:
Its hierarchy are as follows:
The transform of the root node road is the following clean original state:
Now you want to keep the road hierarchy and transform in the same situation and rotate the road 90 degrees.
This means that you want to put the rotation of the road down to the child nodes, of course, so that each child node will not only need to rotate also need to translate.
One way to compare trickery is as follows:
1, add the child node temp under road (its transform is the original unit state), drag Cube (9) ~cube (12) to temp,
2, rotate temp 90 degrees.
3, drag the Cube (9) ~cube (12) from the temp and put it back under the road,
4, Delete temp. Get.
Note: The reason to keep the hierarchy constant is to prevent the script from invalidating because the script s may be hung on the road, and the script s may contain findchild statements, and if hierarchy changes, it is likely that Findchild will not find the corresponding child nodes.
Unity rotates the scene as a whole while keeping the scene root node transform and the hierarchy structure intact