Skip to content
Tutorials Center
My learning

Topics

Lesson 1 of 36 ยท Getting Started

What Is Unity?

Learn what the Unity game engine is, what you can build with it, how projects are organized, what C# has to do with it, and what you need to know before you start.

Unity is a game engine: a large program that already knows how to draw graphics, play sound, simulate physics, read a keyboard or a touch screen, and run your game at 60 frames per second on a phone, a console, a browser or a PC. You do not write that machinery. You describe your game, place objects in scenes, write small scripts in C#, and Unity does the heavy lifting.

This lesson gives you the map: what Unity is good for, what the main ideas are, how the pieces fit, and what this course covers. Nothing here needs an install yet. The next lesson sets up the editor.

What people build with Unity

Unity is used for much more than hobby games. Typical uses:

  • Mobile games: a very large share of phone games are made with Unity.
  • 2D and 3D games for PC and consoles, from small indie titles to big productions.
  • VR and AR experiences, because Unity has strong support for headsets and phone cameras.
  • Simulations and training tools, such as vehicle simulators or architecture walk-throughs.
  • Interactive visualizations, prototypes, and even film pre-visualization.

The same project can be built for many platforms (Windows, macOS, Linux, Android, iOS, WebGL and consoles). You write the game once, then choose a target in the build settings.

The big ideas

Unity is built around a handful of ideas. If you understand these five, the rest of the course is detail.

  1. Scene. A level, a menu screen or a test area. A scene is a file that lists the objects in it and where they are.
  2. GameObject. Everything in a scene is a GameObject: the player, a wall, a light, the camera, an invisible spawn point. A GameObject on its own is an empty container.
  3. Component. Behavior and data are added to a GameObject through components. A Transform gives it a position, a MeshRenderer makes it visible, a Rigidbody makes physics move it, and your own scripts are components too.
  4. Asset. Any file you use: models, textures, sounds, scripts, animations, prefabs. They live in the Assets folder.
  5. Prefab. A reusable template of a GameObject (with its components), so you can create many copies of an enemy or a coin and change them all at once.

You will see this "object plus components" style again and again. It is called a component-based architecture, and it favors combining small parts over building deep class hierarchies.

flowchart LR
    S["Scene"] --> G1["GameObject: Player"]
    S --> G2["GameObject: Camera"]
    S --> G3["GameObject: Coin"]
    G1 --> C1["Transform"]
    G1 --> C2["Rigidbody"]
    G1 --> C3["PlayerController (your C# script)"]
    G3 --> C4["Transform"]
    G3 --> C5["SphereCollider"]

A scene holds GameObjects, and each GameObject is a bag of components.

Where C# fits in

Unity scripts are written in C#. A script is a class that derives from MonoBehaviour; once you attach it to a GameObject, Unity calls special methods on it at the right moments: Awake, Start, Update and others. Here is what a tiny script looks like (read-only, because Unity itself cannot run on this page):

C#
using UnityEngine;

public class Spinner : MonoBehaviour
{
    public float degreesPerSecond = 90f;

    void Update()
    {
        transform.Rotate(0f, degreesPerSecond * Time.deltaTime, 0f);
    }
}

Attach Spinner to a cube and the cube turns around its vertical axis. Chapter 3 explains every line. You do not have to be a C# expert to begin, but you should know variables, if, loops, methods and classes. If those are new, the C# tutorial is a good companion.

Unity cannot run inside a web page, so this course shows real Unity scripts as read-only code. Wherever a concept can be demonstrated with plain C#, such as vector math, the game loop or collision tests, the lesson also gives a runnable stand-in written in ordinary C# that you can execute and change right here.

A first runnable stand-in

Games are mostly numbers: positions that change a little every frame. This stand-in imitates a GameObject that has a position and a velocity, and "updates" it ten times, just like Unity would call Update.

C# A GameObject as plain C# (stand-in)

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with Console.ReadLine()), it gets the next line from this box.

After ten frames of 0.1 s the ball has traveled 2.5 units, because speed times time is distance. That relationship powers most movement in games.

Components as small pieces: another stand-in

The component idea works in plain C# too. A "GameObject" holds a list of components, and each component gets an Update call. Add a new behavior class and it just works, without changing the container.

C# Component-based design in plain C# (stand-in)

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with Console.ReadLine()), it gets the next line from this box.

The object has no idea what its components do; it only calls Update. Unity's GameObject works the same way, with the difference that Unity finds and calls the methods for you.

Versions and licensing, briefly

Unity ships as Unity 6 (the current long-term line, the successor to the 2022 LTS versions) and keeps adding point releases. Always pick an LTS (long-term support) version for a real project: it gets bug fixes without surprise feature changes. Unity has a free plan for individuals and small studios under a revenue threshold; check the current terms on the Unity website before you publish a commercial game, because plans change.

Unity has several rendering pipelines you will meet in chapter 2: the Built-in pipeline (older), the Universal Render Pipeline (URP), which is the recommended default for most new projects, and the High Definition Render Pipeline (HDRP) for high-end visuals.

What this course covers

  • Chapter 1, Getting Started: install, first scene, how the game loop works.
  • Chapter 2, Editor and Project Basics: windows, GameObjects, transforms, prefabs, assets.
  • Chapter 3, C# Scripting: MonoBehaviour, lifecycle, movement, references, coroutines.
  • Chapter 4, Physics and Collisions: rigidbodies, colliders, triggers, raycasts, forces.
  • Later chapters cover UI and input, animation and audio, 2D and 3D workflows, optimization, publishing and complete projects.

Check your understanding

Quick check ยท 4 questions

of 4 answered You scored / 4 ยท perfect!

  1. 1. What is a GameObject in Unity?

    A GameObject is an empty container in a scene. Components such as Transform, Rigidbody or your own scripts give it behavior and data.
  2. 2. Which language do you use to write Unity scripts?

    Unity scripts are C# classes, usually deriving from MonoBehaviour.
  3. 3. What is a prefab?

    Prefabs let you create many copies of an object and update them all by editing the template.
  4. 4. Which version type should a real project normally use?

    LTS releases receive bug fixes without big feature changes, which keeps a project stable.

Summary

  • Unity is a cross-platform game engine; you build scenes, add components and write C# scripts.
  • Core ideas: scene, GameObject, component, asset, prefab.
  • Scripts derive from MonoBehaviour, and Unity calls methods such as Update for you.
  • Use an LTS version and the Universal Render Pipeline for most new projects.
  • On this site Unity code is read-only; plain C# stand-ins run in the page.

Next: Install Unity and Create a Project