Tool: Unity 5.5 2017.3.0f3.
While using Unity, it is inevitable to have quite a amount of GameObjects in the scene. i.e. When designing an Arkanoid game, there are quite a lot
blocks placed on the scene:
However, it might be boring and tedious to manually align all the red blocks in one line with the same gap.
Here is the trick you can do this in a much much faster/efficient way with only 2 steps:
1, Create an empty game object in the scene and drag and drop all the block_red game objects under the empty game object just created. In this case, it was named Block_RED. At the same time, select all the block_red game objects in the scene, and add
Layout Element component in the inspector, and it will looks like:
2, Select the Block_RED game object, in the inspector window, add a component call Horizontal Layout Group. As in our case, we want to align all the objects horizontally. Set the spacing as
5.0, set the child alignment as