~3 min read

The Unity Editor, the Scene, and the Hierarchy

The main editor windows, plus GameObject and Transform — the DOM of the 3D world.

The Editor: where you’ll look at the world from

The Unity Editor is an IDE for content. A set of dockable windows that you can drag around and save as a layout. The key ones out of the box:

  • Scene View — the editor’s 3D viewport. This is where you fly around and place objects.
  • Game View — what the player will see: the render from the active camera.
  • Hierarchy — the tree of objects in the current scene.
  • Project — the project’s files (assets): models, textures, scripts, materials.
  • Inspector — the properties of the selected object. This is where you edit components.
  • Console — the log, errors, and warnings (Debug.Log, Debug.LogError).
Web

The browser’s DevTools: Elements, Console, Sources, Network. The browser Inspector is about the CSS styles of a DOM element.

Unity

The Hierarchy is “Elements” (the scene tree). The Inspector is “Styles,” except it edits the components on a GameObject. The Project is the “Sources” file tree.

The Scene

A scene is a .unity file describing a specific level or screen: which GameObjects it contains, with which components and values. Scenes are loaded via SceneManager.LoadScene. It’s the analog of a page (route) in an SPA.

Modern development often uses additive loading: one base scene with the UI and managers, on top of which level scenes are loaded.

using UnityEngine.SceneManagement;

SceneManager.LoadScene("Level_01");                          // full replacement
SceneManager.LoadScene("HUD", LoadSceneMode.Additive);       // on top of the current one

GameObject — the main primitive

A GameObject is an empty container. On its own it does nothing: it neither renders nor moves. All of its behavior comes from components. A GameObject always has one mandatory component — Transform (or RectTransform for UI).

Web

A <div> DOM element. Empty on its own, but with CSS classes and attributes it gains behavior (animations, positioning, event handlers).

Unity

A “Player” GameObject. Add a CharacterController and it moves like a capsule. Add a MeshRenderer and it becomes visible. Add your PlayerInput.cs and it responds to input.

Transform — 3D position, rotation, and scale

A Transform stores local values relative to the parent:

  • localPositionVector3 (x, y, z), in meters
  • localRotation — a Quaternion (internally), with localEulerAngles as a convenient representation in degrees
  • localScaleVector3 (x, y, z), multipliers

And derived world values: position, rotation, eulerAngles. If an object is a child, its world values are computed through a chain of transformation matrices.

transform.localPosition = new Vector3(0, 1.5f, 0); // 1.5 m above the parent
transform.Rotate(0, 90f, 0);                       // rotate 90° around Y
transform.localScale = Vector3.one * 2f;           // ×2 on all axes
Pitfall: scale in the hierarchy

If a parent is scaled non-uniformly (for example, (2, 1, 1)) and a child is rotated, the child’s world scale becomes “skewed” — Unity shows warnings in the Inspector. Try not to mix non-uniform scale with rotations in the hierarchy.

The coordinate system

Unity uses a left-handed coordinate system:

  • +X — right
  • +Y — up (important for those used to Z-up in Blender/3ds Max)
  • +Z — forward

By default, one Unit = 1 meter. This affects physics: gravity is 9.81 m/s² by default. If your models are imported at a “centimeter” scale, physics will behave strangely. Adjust the Scale Factor in the model importer.

Hierarchy and parenting

By making one GameObject a child of another, you attach its Transform to the parent’s. The child inherits position, rotation, and scale. This is a handy technique for:

  • Grouping (folders in the hierarchy): an empty GameObject as a container for a collection of enemies.
  • Logical links: arm → hand → sword; move the arm and the sword follows.
  • Prefabs: a character model with a skeleton is a hierarchy of Transforms with components on the relevant nodes.
// Make `child` a child of `parent`
child.transform.SetParent(parent.transform, worldPositionStays: true);

// Detach
child.transform.SetParent(null);

The worldPositionStays parameter determines whether the world position is preserved when reparenting. By default it’s true — Unity recomputes localPosition so the object stays “in place.”

In the next section we’ll look at exactly how you write behavior — through MonoBehaviour and its lifecycle.