Game development

Stage 2 · Lesson 1 of 7

C# for Unity

Programming for games

Unity scripts are written in C#. The are the parts you use every day: classes, fields and properties, methods, lists and dictionaries, enums, and events. You also use Unity types such as Vector3 (a position or direction in 3D) and Transform (where an object is and how it is turned and sized).

Learn early. They let you store data, such as weapon stats, as assets in the editor rather than numbers buried in code. You do not need advanced C# to start.

But do learn how and null work. They explain Unity's most common error, NullReferenceException, which means your code used something that was never set. Everything later in Unity builds on this, from components to saving.

Common trapmaking every field public just so it shows in the , instead of using [SerializeField] private fields.

A question to check yourself, an AI practice session and 1 cheat sheet entry come with the full roadmap. Unlock

Resources for this stage

Start with· follow one of these

  • CourseFree
    Unity Learn: Junior Programmer Pathway

    Unity Technologies · Beginner

    Unity's official free C# pathway, with small playable projects in every unit

  • GuideFree
    Learn C#

    Microsoft · Beginner

    Microsoft's free C# lessons, for the language itself when Unity code feels unfamiliar

Practise

  • Free mentored exercises in C# and C++ to strengthen the language outside the engine

Keep handy

Also worth your time

Mark this stage as not done?