Menu
CoddyTech
NewJourney

Learn Unity with C#

A free, interactive Unity course for people who already know C#. Write real Unity scripts and play the 3D game right next to your code, with AI hints and a certificate.

1,000+ codders enrolled

236 lessons229 challenges840 quiz questions

  • Beginner friendly
  • sparkles iconAI-assisted coding help
  • hint iconHands-on interactive lessons
  • volume On iconAudio narration on every lesson
  • quiz iconQuizzes to test your knowledge
  • certificate iconFree certificate of completion

Play Unity C# right here

Three small games written in Unity C#. Press Play, then move a slider: the number changes in the code and the game restarts with it. On a phone, use the keys on the screen.

Roll the ball into the coins with the arrow keys or WASD, and jump with Space. Push force up and the ball takes off.

Live values
using UnityEngine;
using TMPro;

public class Ball : MonoBehaviour
{
    public float force = 12f;
    public float jumpForce = 5f;
    public TMP_Text scoreText;

    private Rigidbody rb;
    private int coins;

    void Start()
    {
        rb = GetComponent<Rigidbody>();
        ShowScore();
    }

    void Update()
    {
        bool onGround = transform.position.y < 0.55f;
        if (Input.GetKeyDown(KeyCode.Space) && onGround)
        {
            rb.AddForce(Vector3.up * jumpForce, ForceMode.Impulse);
        }
    }

    void FixedUpdate()
    {
        float x = Input.GetAxis("Horizontal");
        float z = Input.GetAxis("Vertical");
        rb.AddForce(new Vector3(x, 0f, z) * force);
    }

    public void AddCoin()
    {
        coins++;
        ShowScore();
    }

    void ShowScore()
    {
        scoreText.text = "Coins: " + coins;
    }
}

Writing these scripts yourself is the course: free, in your browser.

Syllabus

4 sections7 projects236 lessons229 challenges840 quiz questions
  1. Start sectionStartExpandCollapseYou know C#; now make it move. Unity scripts, the Inspector, input, vectors, transforms, components, prefabs and the script lifecycle, ending with two small games.

    Your First Script

    6 lessons625

    The Inspector

    5 lessons420

    Input

    5 lessons520

    Vectors

    7 lessons730

    Transforms and Hierarchy

    5 lessons520

    GameObjects and Components

    7 lessons630

    Project: Catch the Star

    Project6 lessons65

    Finding Things

    6 lessons525

    Prefabs and Spawning

    7 lessons730

    The Script Lifecycle

    5 lessons420

    Project: Dodge the Blocks

    Project5 lessons55

    Final Challenges

    3 lessons315
  2. Start sectionStartExpandCollapseRigidbodies, collisions, triggers, coroutines, raycasts, rotation, cameras and enemies, ending with two physics games: Coin Rush and Arena Escape.

    Rigidbody

    7 lessons730

    Collisions

    7 lessons630

    Triggers

    6 lessons625

    Coroutines

    6 lessons625

    Project: Coin Rush

    Project6 lessons65

    Raycasts

    7 lessons730

    Rotation

    5 lessons520

    The Camera

    5 lessons520

    Enemies

    6 lessons625

    Project: Arena Escape

    Project5 lessons55

    Final Challenges

    3 lessons315
  3. Start sectionStartExpandCollapseOn-screen UI, buttons and menus, a game manager, scenes and levels, saving, pause and slow motion, the CharacterController and Unity 6's Input System, ending with an endless runner and a 3D platformer.

    On-Screen Text

    5 lessons520

    Buttons and Screens

    6 lessons625

    The Game Manager

    5 lessons520

    Scenes and Levels

    5 lessons520

    Saving with PlayerPrefs

    5 lessons520

    Project: Endless Runner

    Project6 lessons65

    Time Control

    4 lessons415

    Character Controller

    6 lessons625

    The New Input System

    5 lessons420

    Project: 3D Platformer

    Project6 lessons65

    Final Challenges

    3 lessons315
  4. Start sectionStartExpandCollapseHow bigger Unity games stay manageable: small components, interfaces, events, ScriptableObjects, serialized data, JSON saves, state machines, generics and pooling, ending with an arena survivor.

    Components, Not Hierarchies

    5 lessons520

    Interfaces in Unity

    4 lessons415

    Events

    5 lessons520

    Serialized Data

    4 lessons415

    ScriptableObjects

    5 lessons520

    Saving with JSON

    4 lessons415

    State Machines

    5 lessons520

    Reusable Code

    4 lessons415

    Object Pooling

    4 lessons315

    Project: Arena Survivor

    Project7 lessons75

    Final Challenges

    3 lessons315

Unity courses

Hands-on Unity courses, free to start in your browser.

What you get
Everything you'll use to learn to code

Learn by Doing

Write real code, query databases, build websites, and master AI prompts. Our interactive lessons cover every skill modern developers need.

playground.js
Code Editor
1const greeting = "Hello, Coddy!"
2function sayHi(name) {
3    return greeting + " " + name
4}
5
bottombar Collapse icon
Test #1test Case Success icon
Test #2test Case Success icon
Test #3test Case Failure icon
Input
"Alex"
Output
"Hello, Coddy! Alex"

Build Your Streak

Stay consistent and watch your progress grow! Track your daily coding habit, protect your streak with freeze days, and earn rewards for showing up every day.

12 days streak

Return tomorrow to keep your streak!

fire Filled icon
left icon

January 2026

right icon

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

21

22

23

24

25

26

27

28

29

30

product Double Or Nothing icon

Double or Nothing

Day 5 of 7

fire Freeze icon

Streak Freeze

2 left

You're Not Alone

Compete on global leaderboards, invite friends to earn rewards, and celebrate each other's wins. Coding is better with friends!

Challenger League
Challenger LeagueTop 7 advance
leaderboard First icon1
avatar 1 icon
fire Filled icon
Alex7+ Days
2840
leaderboard Second icon2
avatar 2 icon
fire Filled icon
Jordan7+ Days
2650
leaderboard Third icon3
avatar 3 icon
fire Filled icon
Sam7+ Days
2420
4
avatar 4 icon
Casey
2180
5
avatar placeholder icon
fire Filled icon
Morgan7+ Days
1950
leaderboard Arrow Up iconPromotion zoneleaderboard Arrow Up icon

Every way to learn

Read, listen, test yourself, ask the AI, or look up anything you've already covered. Every lesson meets you where you are.

Intro to Variables
Audio

A variable is a named container that stores a value you can reference later in your program.

In Python, you create one by writing the name, an equals sign, then the value you want to store.

The value can change over time - reassigning the name simply points it to a new value.

1xSarah

Earn a Certificate

Earn certificates for every course you complete. Add them to your LinkedIn profile and resume to showcase your coding expertise to employers.

CoddyCertificate of Completion
This certifies thatJohn Doehas successfully completed
python iconPython Fundamentals
Verified
DateJan 2026
LinkedInAdd to LinkedIn

Why learn Unity scripting with Coddy

  • Your script and your game sit side by side. Press Play and the scene runs your MonoBehaviour, with a Console, a Hierarchy and a live Inspector under the game, laid out the way the Unity editor shows them. Press Check and the same scene is graded against the lesson's checks.
  • The Unity 6 API you will use in every project: Start and Update, transform, GetComponent, Rigidbody and colliders, OnCollisionEnter and triggers, Instantiate and Destroy, coroutines, UI with TextMeshPro, SceneManager, PlayerPrefs, CharacterController and the Input System. Then the architecture larger games need: ScriptableObjects, events, state machines and object pooling.
  • Seven games inside the course, each built one feature per lesson: Catch the Star, Dodge the Blocks, Coin Rush, Arena Escape, an Endless Runner, a 3D Platformer and Arena Survivor. Snake 3D, Brick Breaker and Tower Defense follow as separate courses.
  • It runs in your browser on Coddy's own engine, which copies Unity's API, defaults and error messages, so the C# you write here is the C# you write in Unity. There is nothing to install, so a school Chromebook works, and on a phone the game shows on screen keys.

Frequently asked questions about learning Unity

What programming language does Unity use?

C#. Every script in a Unity game is a C# class, usually a MonoBehaviour attached to a GameObject. Unity once also offered UnityScript, a JavaScript look-alike, and Boo, but both were removed years ago. Unity has visual scripting too, but most tutorials, jobs and assets expect C#.

Do I need to know C# before learning Unity?

For this course, yes. It is written for people who already know C# basics: variables, methods, classes, lists and loops. It teaches the C# that Unity leans on and general C# courses often skip, such as enums, structs, lambdas and coroutines with yield, but not the language from zero. If you are new to C#, take the C# course first: its fundamentals and object oriented programming sections are what Unity needs.

Do I need to install Unity for this course?

No. Every lesson runs in your browser on Coddy's own engine, which copies Unity's API, so there is no editor to download and no project to set up. It is not the Unity editor: there is no Scene view to drag objects around in, and each lesson builds its scene for you. To make and ship a game of your own you will use the Unity editor, which is free for personal use on Windows, macOS and Linux. The scripts you write here carry over.

Can I learn Unity on a Chromebook or a phone?

Yes. The Unity editor does not run on ChromeOS, tablets or phones, but these lessons do: the code editor and the game both run in the browser, and on a touch screen the game shows on screen arrow keys and a Space key. To build your own Unity game later, you will need a Windows, Mac or Linux computer.

Is this the real Unity?

No. It is Coddy's own engine, which runs your C# in the browser and imitates the part of Unity 6 these lessons teach: GameObjects and components, physics, UI, scenes, saved data and the Input System. It copies Unity's defaults, quirks and error messages on purpose, so what you learn transfers to the editor. It has no editor of its own, no Asset Store, no animation system and no 2D. Coddy is not affiliated with or endorsed by Unity Technologies. Unity is a trademark of Unity Technologies.

What games will I make?

Seven inside the course: Catch the Star, Dodge the Blocks, Coin Rush, Arena Escape, an Endless Runner, a 3D Platformer and Arena Survivor, each built feature by feature until it can be won and lost. Snake 3D, Brick Breaker and Tower Defense are separate courses that build one complete game each. The Unity Game Development path puts them all in order, after the C# you need.

How long does it take to learn Unity?

This course is 236 lessons in 4 sections, about 40 hours at your own pace, or two to three months at an hour a day. Shipping a game of your own in the Unity editor takes longer: plan on a few months of small projects after the course, where you also learn the editor itself.

Is the Unity course free?

Yes. The lessons, the game in every lesson, the AI hints and the certificates are free. A free account works through a few lessons a day, and Pro removes the daily limit.

Learning paths that include this course

This course is one step of a longer path: several courses in the order a mentor would teach them, each with its own free certificate.

Coddy programming languages illustration

Learn Unity with Coddy

GET STARTED