What is Unity?

Unity is a game engine: a program that handles graphics, physics, sound and input so you can focus on making your game. You build scenes in the Unity Editor and add behavior with C# scripts.

The four building blocks

A LEGO set. A GameObject is a blank baseplate. Components are the bricks you snap onto it: wheels make it roll, a motor makes it move, a light makes it glow. A Scene is the table where you set up your creations, and your Assets are the box of spare parts.

Almost everything in Unity comes down to four ideas.

ConceptWhat it isReal-world comparison
SceneA level, menu or screen. It holds a list of GameObjects.A stage in a theater
GameObjectAny "thing" in a scene: a player, a light, a camera, an empty folder object. By itself it does nothing.An empty box
ComponentA piece of functionality attached to a GameObject: a mesh to draw, a collider, a script.The things you put in the box
AssetA file in your project: models, textures, sounds, scripts, prefabs.Props in the storage room

For example, a "Player" GameObject might have these components:

Scene: Level1GameObject: PlayerTransformMesh RendererCapsule ColliderRigidbodyPlayerController (your script)GameObject: Main CameraTransformCameraAudio Listenereach row is one Component
A Scene holds GameObjects. Each GameObject is a container, and its behavior comes from the components inside it, including your own scripts (highlighted).
Key ideaUnity uses composition. Instead of writing one giant "Player" class, you combine small components. Want something to fall? Add a Rigidbody. Want it to make noise? Add an AudioSource.

The Editor windows

WindowWhat you use it for
Scene viewMove around the world and place objects.
Game viewSee what the player sees through the camera. This is where the game runs when you press Play.
HierarchyA list of every GameObject in the open scene. Dragging one onto another makes it a child.
InspectorShows the components of the selected GameObject and lets you edit their values.
ProjectYour files (assets). Like a file explorer for the Assets folder.
ConsoleShows messages from Debug.Log, plus warnings and errors. Double-click an error to jump to the line of code.

Play Mode

Pressing the Play button runs your game inside the Editor.

Changes in Play Mode are lostAnything you change in the Inspector while the game is running goes back to how it was when you press Stop. This is on purpose, so you can experiment safely. If you find values you like, write them down or copy the component (right-click the component header > Copy Component), stop, then paste the values.

Units and directions

2D vs 3D

Unity does both. A 2D game is still a 3D world viewed from the front with an orthographic camera. The main difference for scripting is that 2D physics uses separate components: Rigidbody2D, BoxCollider2D, and callbacks like OnCollisionEnter2D. 2D and 3D physics do not interact with each other.

Next step

Continue to Your First Script.