How do I…?
Lessons are in teaching order. This page is in asking order. If you are stuck on something and you know what you want to happen but not how to make it happen, find your question below — it is probably already written down, in roughly the words you would use.
This is the intended way to look things up. Searching a question like “how do I make an object disappear in Unity” is exactly what a working programmer does. The difference is that the answers here are written for the version of Unity this course uses, and they build on code you have already written.
The two questions every lesson asks
Near the top of every lesson in this course, before any code, there is the same block. It asks two questions. They never change, and they are the most valuable thing on this site — more valuable than any Unity API, because they are what you will still be doing in ten years in a language that does not exist yet.
- What are the parts? A whole feature is too big to hold in your head at once. “Move the player” is not one problem — it is read the input,build a direction, apply the movement. “Collect a coin” is not one problem either — it is confirm the thing that touched me was a coin,change the count, destroy the object. Almost every student who decides they are bad at programming has actually just met a problem they never split up.
- Where do I read about each part? A part you can name is a part you can search for. “Make the turret shoot” returns nothing useful. “Clone a prefab at a position” returns exactly what you need. Every part in the block names where to read about it — and a part with no reading attached is not a part yet, it is the whole problem wearing a shorter name.
There used to be a third question here — “how is this like something I have already built?” It is still worth asking, and the course is still sequenced so that a spike is a coin with consequences and a projectile is a coin with a direction. But asked in all 81 lessons it turned into a formality, answered without thinking, and it cost more writing than it was worth. Now it is asked only where the connection is the thing that makes the problem make sense.
Then it asks you to write the answers down, in the same answer boxes as every other question in the course. That is deliberate: the thinking is the assignment, not a warm-up before it.
The support you get changes on purpose
You may have noticed that some lessons hand you almost everything and later ones hand you almost nothing. That is deliberate, and it is worth understanding why — because“my teacher stopped giving me code” is the moment most people learning to program give up, and it is not supposed to be how it feels.
The rule is: the first time a concept appears, you get everything explained. Every time after that, you get less — because what you are being asked to do is something you have already done once, wearing different clothes. Spikes are a lot like coins. A projectile is a lot like a coin with a direction. By the time you build the projectile you have already written everything it needs, and you do it alone because youcan.
| Badge | What the lesson gives you | What you do |
|---|---|---|
| Full walkthrough | Every line given and explained | You type it, and each line is annotated before the next arrives. Nothing is withheld. |
| Guided build | Shape given, some gaps to fill | The structure is laid out and the API is named; you work out the details. |
| Outline only | Spec and API only | The problem is stated as a specification with the functions listed. No code. |
| Solo build | The problem, and nothing else | You have built this shape before. Now build it again, from the question alone. |
If a lesson feels too hard for where you are, that is real information — it usually means an earlier dot did not get connected, not that you are bad at this. Go back to the lesson the badge points at and reread the walkthrough. The whole point of writing every line down the first time is that you can always go back and find it.
The rule behind the badges: the first time a concept appears you get every line explained, and every time it comes back you get less. That is not the course getting harder to be unkind. It is the difference between being shown a thing and being able to do it.
Moving a character
Getting input, turning it into motion, and making it feel right.
- how do I print text to the console?1.3Full walkthrough
Your first script: Start vs Update, and Debug.Log as your window into running code.
- how do I get input from the keyboard?1.4Full walkthrough
Virtual axes vs raw keys, and why "Horizontal" beats hardcoding the D key.
- how do I move an object in Unity?1.4Full walkthrough
The whole input → direction → translate pipeline, built line by line.
- why does my character move faster diagonally, and how do I fix it?1.5Full walkthrough
Vector length, and what .normalized does about it.
- how do I make movement the same on every computer?1.5Full walkthrough
Time.deltaTime, frame independence, and the live-tuning workflow.
Touching things
Detecting contact, and making something happen when it occurs.
- how do I detect a collision, and make something happen?2.1Full walkthrough
Collider2D, Rigidbody2D, and the trigger-vs-collision distinction.
- how do I make a coin disappear when I touch it?2.1Full walkthrough
OnTriggerEnter, tags, and your first piece of remembered state.
- how do I take damage when I touch a spike?2.2Guided build
Health, damage, and what happens when it reaches zero.
- how do I stop my character walking through walls?2.2Guided build
The payoff of the 1.4 discovery: choosing a movement method that respects physics.
- how do I heal, and how do I cap health at a maximum?2.3Outline only
Clamping a value, and why the cap belongs where the value changes.
- how do I spawn lots of the same object?2.4Outline only
Prefabs, Instantiate, and placing many copies from one definition.
- how do I add an item to my inventory?5.1Guided build
Boolean flags as the simplest possible inventory.
Making things happen at a distance
Detection ranges, projectiles, and enemies that react to you.
- how do I make a turret notice the player?3.1Outline only
Distance between two objects, and a detection radius.
- how do I shoot a projectile?3.2Solo build
Instantiate, direction vectors, and Destroy.
- how do I make an object disappear?3.2Solo build
Destroy, and the difference between hiding something and removing it.
- how do I stop shooting too fast?3.3Guided build
Cooldowns with Time.time — the interval pattern from 1.3, reused.
- how do I make my bullet hurt the player?3.4Outline only
Putting a body on a moving object, detecting the hit, and calling a method on another script.
- how do I make an enemy chase me?4.3Solo build
An aggro radius, and moving toward a target you did not choose.
- how do I make an enemy follow a patrol route?4.1Guided build
Waypoints, and a state that runs without you.
- how do I read an animator somebody else set up?4.2Outline only
The same Animator API following rules you did not choose — reading a state machine you did not build.
- how do I stop a contact hit hurting me sixty times a second?4.4Outline only
Rate-limiting a collision callback, and choosing between three hazard models.
- how do I make an enemy switch between patrolling, chasing and attacking?4.5Guided build
A state field, the arrows between the states, and one place that says what the enemy is doing.
Showing the player what is going on
Animation, on-screen text, and feedback.
Scenes, doors and persistence
Moving between levels, and keeping what the player earned.
- how do I open a door with a key?5.2Full walkthrough
Events — letting one object tell another that something happened.
- how do I switch scenes?5.3Full walkthrough
SceneManager, and what happens to everything you were carrying.
- how do I keep my health when I change scenes?5.3Full walkthrough
DontDestroyOnLoad, singletons, and the duplicate guard you will need.
Jumping and platforming
Gravity, ground checks, and making a jump feel good.
- how do I jump?6.1Full walkthrough
Gravity, vertical velocity, and the first flick upward.
- why can I jump forever in mid-air?6.2Guided build
Ground checks — proving you are standing on something before you jump.
- how do I make a double jump?6.4Outline only
A counter, and resetting it on landing.
- how do I make my jump feel good?6.3Guided build
Fall speed, coyote time and the jump buffer — four numbers, two of them timers that remember a moment.
- how do I build a level out of tiles?7.1Outline only
The Grid, the palette and the paint tools — drawing a level instead of placing one object at a time.
- why is my tilemap solid, and why is my player in front of it?7.2Outline only
The colliders you inherited, the layers your ground check was already gambling on, and sorting order.
- how do I climb a ladder?7.3Outline only
Climbing as a state, and switching off gravity while you are in it.
- how do I stop my ladder breaking at the top and bottom?7.4Outline only
Mount and dismount conditions — the edge cases that make a climb feel finished.
Building a boss fight
Assembling an enemy out of parts that already exist, and making a fight the player can read.
- how do I build a boss when there is no boss prefab?8.2Outline only
Assembling a body, a collider and a health number out of art that is already in the project.
- how do I make my swing actually hurt something?8.3Guided build
A damage window, and an overlap query that asks the physics engine what is in front of you.
- how do I give a boss two attacks and a phase table?8.4Outline only
Telegraphed attacks, and moving every timing number into data so Phase 3 is a change of values.
- how do I make winning and dying both real?8.5Outline only
End states, and what your death loop costs when two systems turn out to disagree.
Data, bits and systems
What your numbers look like underneath, and what runs them.
- how do I read a number as bits?9.1Outline only
Binary, powers of two, and why a fixed width means a fixed ceiling.
- how do I read a colour as a number?9.2Outline only
Hex, RGB, and the same bits wearing a shorter coat.
- how do I make a file smaller without losing anything?9.3Outline only
Lossless vs lossy compression, and what each one throws away.
- how do I find out what is inside a file?9.4Outline only
Metadata, file formats, and the difference between the data and its label.
- how do I find a pattern in a pile of data?9.5Outline only
Datasets and the questions you can and cannot answer from one.
- how do I tell whether data is fair?9.6Outline only
Bias, filtering, and how a clean dataset can still mislead.
- why did my game stutter on one computer and not another?9.7Outline only
CPU, GPU, RAM and the frame budget — the machine your code runs on.
- how does a message find its way across the internet?9.8Outline only
Packets, routing, and DNS turning a name into an address.
- how do I keep a message secret in transit?9.9Outline only
Keys, TLS, and why public-key encryption is not a contradiction.
- what do I owe the project I forked?9.10Outline only
Licenses, attribution, and the ethics of who gets to play — reading the Apache file your fork already has.
Cards, decks and turns
Turning your jam into data, algorithms, and an opponent that answers back.
- how do I use lists to hold a hand of cards?10.2aOutline only
The list operations the card game is built out of — create, append, remove, length — and reading a hand by index.
- how do I make game data into something I can drag?10.2bFull walkthrough
ScriptableObjects — assets that hold data instead of code.
- how do I shuffle a deck and draw from it?10.2cGuided build
The shuffle algorithm, drawing a hand, and traversing it to render the screen.
- how do I make the computer take a turn?10.2dOutline only
Sequencing, selection and iteration assembled into one opponent.
If your question is not here
Two other places are worth trying before you ask a human. TheUnity + C# Quick Reference lists every API this course uses on a single page, which is what you want when you know the name of the thing and need its exact spelling. The documentation hubgroups the longer explanations by unit.
And if you find the answer to a question that is not on this page — tell your teacher. Every entry here started as somebody being stuck.