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
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 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 lessons625The Inspector
5 lessons420Input
5 lessons520Vectors
7 lessons730Transforms and Hierarchy
5 lessons520GameObjects and Components
7 lessons630Project: Catch the Star
Project6 lessons65Finding Things
6 lessons525Prefabs and Spawning
7 lessons730The Script Lifecycle
5 lessons420Project: Dodge the Blocks
Project5 lessons55Final Challenges
3 lessons315Section 2
Physics and Gameplay
Start sectionStartExpandCollapseRigidbodies, collisions, triggers, coroutines, raycasts, rotation, cameras and enemies, ending with two physics games: Coin Rush and Arena Escape.Rigidbody
7 lessons730Collisions
7 lessons630Triggers
6 lessons625Coroutines
6 lessons625Project: Coin Rush
Project6 lessons65Raycasts
7 lessons730Rotation
5 lessons520The Camera
5 lessons520Enemies
6 lessons625Project: Arena Escape
Project5 lessons55Final Challenges
3 lessons315Section 3
Building Real Games
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 lessons520Buttons and Screens
6 lessons625The Game Manager
5 lessons520Scenes and Levels
5 lessons520Saving with PlayerPrefs
5 lessons520Project: Endless Runner
Project6 lessons65Time Control
4 lessons415Character Controller
6 lessons625The New Input System
5 lessons420Project: 3D Platformer
Project6 lessons65Final Challenges
3 lessons315Section 4
Game Architecture in Unity
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 lessons520Interfaces in Unity
4 lessons415Events
5 lessons520Serialized Data
4 lessons415ScriptableObjects
5 lessons520Saving with JSON
4 lessons415State Machines
5 lessons520Reusable Code
4 lessons415Object Pooling
4 lessons315Project: Arena Survivor
Project7 lessons75Final Challenges
3 lessons315
Unity courses
Hands-on Unity courses, free to start in your browser.
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
- 18
- 18
- 1
- 82
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
- 16
- 16
- 1
- 65
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
- 56
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.