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.

  1. 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.
  2. 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 block above your lesson is the outline of your solution.If you are staring at a blank script not knowing where to start, scroll up and reread it. You are not supposed to hold the whole thing in your head, and nobody who does this for a living does either.

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.

BadgeWhat the lesson gives youWhat you do
Full walkthroughEvery line given and explainedYou type it, and each line is annotated before the next arrives. Nothing is withheld.
Guided buildShape given, some gaps to fillThe structure is laid out and the API is named; you work out the details.
Outline onlySpec and API onlyThe problem is stated as a specification with the functions listed. No code.
Solo buildThe problem, and nothing elseYou 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.

Where the course is right now. The badges below show what each lesson isdesigned to give you, and the ladder is being built out lesson by lesson as the year reaches each one. The badge printed on the lesson page itself is always the truth for that lesson: if a lesson still hands you the questions-only version while this page says it gives you a walkthrough, ask your teacher rather than assuming you missed something.

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.

Touching things

Detecting contact, and making something happen when it occurs.

Making things happen at a distance

Detection ranges, projectiles, and enemies that react to you.

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.

Jumping and platforming

Gravity, ground checks, and making a jump feel good.

Building a boss fight

Assembling an enemy out of parts that already exist, and making a fight the player can read.

Data, bits and systems

What your numbers look like underneath, and what runs them.

Cards, decks and turns

Turning your jam into data, algorithms, and an opponent that answers back.

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.