Stage 2 · Lesson 1 of 7
C# for Unity
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
- CourseFreeUnity Learn: Junior Programmer Pathway
Unity Technologies · Beginner
Unity's official free C# pathway, with small playable projects in every unit
- GuideFreeLearn C#
Microsoft · Beginner
Microsoft's free C# lessons, for the language itself when Unity code feels unfamiliar
Practise
Keep handy
Also worth your time
The exact order Unity calls Awake, Start, Update, FixedUpdate and the rest
- Game Programming PatternsGo deeper
Free book on the state, observer, component and other patterns games rely on