Methods & Classes

Methods are the verbs of your code and classes are the nouns: a method packages an action you can call by name, and a class packages data together with the methods that work on it. In Unity every MonoBehaviour is a class, but the plain classes that never touch the engine, like a Weapon or a Stat, are where most of the clean design in a project lives.

More in C# Foundations

  1. Variables & Types
  2. Control Flow & Loops
  3. Methods & Classes
  4. Collections
  5. Interfaces & Inheritance
  6. Delegates & Events

All 42 topics in the Learn Unity Roadmap