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,401+ codders enrolled
280 lessons273 challenges225 quiz questions
- Beginner friendly
AI-assisted coding help
Hands-on interactive lessons
Audio narration on every lesson
Quizzes to test your knowledge
Free 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.
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
Section 1
Unity Scripting Basics
Start sectionStartYour first C#, inside a game: variables, if, loops and methods. Then Unity scripts, the Inspector, input, vectors, transforms, components, prefabs and the script lifecycle, ending with two small games.C# Basics in Unity
8 lessons8Make It Move
5 lessons55The Inspector
5 lessons45Input
5 lessons55Vectors
7 lessons75Transforms and Hierarchy
6 lessons65Loops and Methods
6 lessons65GameObjects and Components
7 lessons65Project: Catch the Star
6 lessons64Finding Things
6 lessons55Prefabs and Spawning
8 lessons85The Script Lifecycle
5 lessons45Project: Dodge the Blocks
6 lessons64Final Challenges
5 lessons55Section 2
Physics and Gameplay
Start sectionStartRigidbodies, collisions, triggers, coroutines, raycasts, rotation, cameras and enemies, ending with two physics games: Coin Rush and Arena Escape.Rigidbody
7 lessons75Collisions
7 lessons65Triggers
7 lessons75Coroutines
6 lessons65Project: Coin Rush
7 lessons74Raycasts
7 lessons75Rotation
5 lessons55The Camera
5 lessons55Enemies
7 lessons75Project: Arena Escape
7 lessons74Final Challenges
6 lessons65Section 3
Building Real Games
Start sectionStartOn-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 lessons55Buttons and Screens
6 lessons65The Game Manager
5 lessons55Scenes and Levels
5 lessons55Saving with PlayerPrefs
5 lessons55Project: Endless Runner
7 lessons75Time Control
4 lessons45Character Controller
6 lessons65The New Input System
5 lessons45Project: 3D Platformer
8 lessons85Final Challenges
4 lessons45Section 4
Game Architecture in Unity
Start sectionStartHow 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
6 lessons65Interfaces in Unity
5 lessons55Events
6 lessons65Serialized Data
5 lessons55ScriptableObjects
7 lessons75Saving with JSON
5 lessons55State Machines
7 lessons75Reusable Code
4 lessons45Object Pooling
4 lessons35Project: Arena Survivor
11 lessons114Final Challenges
4 lessons45
Unity courses
Hands-on Unity courses, free to start in your browser.
Unity Game: Sky Lanes
NewBuild a 3D endless runner in Unity with C#, a feature per lesson: three lanes, jumps and slides, a road that never ends, obstacles, coins, a magnet and a shield, a speed that keeps climbing and a best score. It runs in your browser as you write it.
- 21
- 21
- 1
- 20
Unity Game: Tower Defense
NewBuild a 3D tower defense game in Unity with C#, a feature per lesson: enemies that walk a path in waves, towers you place, aim and fire, money, upgrades, splash and frost, and a base to defend.
Certificate on completion
- 25
- 25
- 1
- 15
Unity Game: Brick Breaker
NewBuild a 3D Brick Breaker game in Unity with C#, a feature per lesson: a paddle and a bouncing ball, a wall of bricks, lives and levels, and power-ups that widen the paddle or split the ball.
Certificate on completion
- 19
- 19
- 1
- 15
Unity Game: Snake 3D
NewBuild a 3D Snake game in Unity with C#, a feature per lesson: a snake that moves on a grid, steering, food, a growing tail, walls and self bites, a score, speed and a best score.
Certificate on completion
- 14
- 14
- 1
- 14
Learn by Doing
Write real code, query databases, build websites, and master AI prompts. Our interactive lessons cover every skill modern developers need.
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!
January 2026
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
Double or Nothing
Day 5 of 7
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!
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.
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.
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.
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:
StartandUpdate,transform,GetComponent,Rigidbodyand colliders,OnCollisionEnterand triggers,InstantiateandDestroy, coroutines, UI with TextMeshPro,SceneManager,PlayerPrefs,CharacterControllerand 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?
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?
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?
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.