Skip to main content

Someone wanted to learn this too, so Grasp built them a personal learning path.

You can keep exploring this one or create your own

Organizing Unity GameObjects with Transforms, Hierarchies, and Components

Hello! Last time, you created a 3D project and confirmed that it runs in the Unity Editor. Now you’ll give that project its first pieces of a runner level: a player-shaped cube, a stretch of ground, and obstacles. The aim is not to make them move yet. It is to understand how GameObjects, Transforms, components, and the Hierarchy fit together so you can build and reorganize a scene deliberately.

Allow about 40 minutes, with most of that time spent working in the Editor.


A GameObject is a place to attach functionality

A scene contains GameObjects. The Hierarchy lists the GameObjects in the open scene; the Inspector shows the properties and components of whichever object you select. This differs from the Project window, which holds files and assets you can use in scenes.

Watch Unity’s short Game Objects and Components tutorial for the basic model. Its Inspector uses an older interface: where the video shows a gear icon on a component, your Unity 6 Editor may show a three-dot menu instead.

Game Objects and Components - Unity Official Tutorials

Unity’s “Game Objects and Components” shows why an object is more than its visible shape and where to add or remove components.

Watch objects and components. Focus on the always-present Transform and the Add Component control; you do not need to create a script yet.

Every GameObject has a Transform: its position, rotation, and scale. An empty GameObject has a Transform but no visible geometry, making it useful as an organizational parent. A newly created 3D Cube has more components: its mesh-related components provide the visible cube, while its Box Collider defines a shape that physics can use. Components give a GameObject capabilities; its name alone does not.

For this lesson, you will inspect and edit those built-in components. C# components and gameplay physics come later.


Place objects with Transforms

Unity’s three axes are X (red), Y (green), and Z (blue). For our provisional side-view runner layout, X will run along the track, Y will be height, and Z will provide depth. This is a scene-building convention for this project, not a restriction imposed by Unity.

The Scene view’s Move (W), Rotate (E), and Scale (R) tools are useful for exploring placement. For an exact layout, select an object and type values into its Transform in the Inspector.

The three Scene-view gizmos manipulate a selected GameObject’s Transform. Their red, green, and blue handles correspond to the X, Y, and Z axes.

There is one distinction that becomes important as soon as you group objects: the Inspector shows a child’s Transform relative to its parent. An object without a parent uses world coordinates. Watch the change of reference point in Unity’s hierarchy demonstration; its interface is older, but the parent-child behavior still applies.

The Hierarchy and Parent-child relationships - Unity Official Tutorials

Unity’s “The Hierarchy and Parent-child relationships” demonstrates why parenting can change the coordinates shown in the Inspector without requiring an object to move visibly.

Watch parenting coordinates. Pay particular attention to the object whose displayed position changes when it becomes a child: the new numbers describe its offset from the parent.

The Unity Manual gives you a current reference for the tools and the difference between local and world positions.

Unity - Manual: Transforms

Read the Unity Manual’s “Transforms” page to connect the Scene-view tools with the numeric fields you will edit, then clarify what a child’s displayed position means.

In “Editing Transforms,” read from axes and space. In its “Scene view” subsection, read the gizmo guidance; then, in “Inspector window,” read numeric editing. Finally, under “Editing Transforms for parent and child GameObjects,” read local coordinates.

For example, if a parent sits at world position and its unrotated, unscaled child shows local position , the child sits at world position . Keeping an organizational parent at position , rotation , and scale makes its children’s coordinates easier to reason about. We will do that below.


Build and organize a small scene

Before editing, read the Unity Manual’s instructions for creating objects, duplicating them, and making parent-child groups.

Unity - Manual: Manage GameObjects in the Hierarchy window

This Unity Manual page explains the Hierarchy actions you will use to make the blockout and group its level pieces.

Under “Create a new GameObject,” continue through “Duplicate a GameObject” and “Reorder items in the Hierarchy window,” from creation and duplication. Then, under “Group items using parenting,” read grouping by parenting. Focus on the difference between dragging an object onto another object to parent it and merely reordering objects in the list.

In your existing 3D project, build the following blockout outside Play mode. Changes made during Play mode are generally not retained when you stop it.

  1. In the Hierarchy, use GameObject > Create Empty to create an object named LevelRoot. In its Transform, set Position and Rotation to and Scale to . This object is a container for stationary level pieces, not a visible part of the track.

  2. Use GameObject > 3D Object > Cube to create three cubes. Rename them Ground, Player, and Obstacle_01. You can rename an object from the Hierarchy’s context menu. If a new cube appears under an unintended parent, drag it to the intended place in the Hierarchy before entering its values.

  3. Enter these Transform values in the Inspector. Leave all rotations at .

    Object Position (X, Y, Z) Scale (X, Y, Z)
    Ground
    Player
    Obstacle_01

    A default cube is one unit wide. The ground’s top is therefore at Y ; the player and obstacle rest on it at their respective heights. If it is hard to find an object in the Scene view, select it in the Hierarchy and press F to frame it.

  4. Drag Ground and Obstacle_01 onto LevelRoot in the Hierarchy. Leave Player at the top level: it will eventually move independently of the stationary level. Leave the existing camera and light at the top level too.

Your Hierarchy should now have this structure, though its top-level ordering may differ:

Main Camera
Directional Light
Player
LevelRoot
    Ground
    Obstacle_01

The indentation is meaningful: Ground and Obstacle_01 are children of LevelRoot. A folder in the Project window would organize assets; this parent organizes scene objects and can also transform them together.


Inspect components and test what parenting does

Select Obstacle_01 and look down its Inspector. Identify its Transform, Mesh Filter, Mesh Renderer, and Box Collider. To practice changing an object’s component set, open the Box Collider component’s menu and choose Remove Component. The cube should remain visible: its mesh-related components still provide its appearance. Then use Add Component, search for Box Collider, and add it back. You have restored its collision shape, although we are not configuring gameplay physics yet.

Next, test the hierarchy without leaving a permanent change. Select LevelRoot and temporarily change its Z position from to . Both the ground and obstacle should shift together; Player should not. Select Obstacle_01: its Inspector should still show a local Z position of , because that is its offset from LevelRoot. Set LevelRoot’s Z position back to . This is why a seemingly organizational decision—parenting—also affects coordinates and movement.

Finally, select Obstacle_01, duplicate it with Ctrl+D or Duplicate from its context menu, and rename the copy Obstacle_02. Keep it under LevelRoot; set its position to and scale to . You now have two independently editable scene objects. In a later lesson, you’ll turn repeated obstacles into reusable prefabs rather than maintaining copies by hand.

Save the scene using File > Save As and give it a clear name such as RunnerBlockout in an Assets/Scenes folder. If the Game view does not show this layout yet, do not treat that as a failed blockout: it displays what the camera sees. Today, verify placement in the Scene view; camera composition is the next lesson’s task.


Where you are now

You have created visible and empty GameObjects, edited their Transforms, added and removed a component, and built a hierarchy whose structure has a practical effect. The crucial distinction is that a child’s Inspector coordinates are local to its parent, while an unparented object’s coordinates are measured in world space.

Next, you’ll make this blockout readable from a side-view camera and use lighting and materials to distinguish its parts.

Can't find a good explanation? Sign up and we'll make it for you

Sign up