Unity Learn home
View Tutorial Content

Introduction to classes

Tutorial
Beginner
+10 XP
25 Mins
(44)
Overview
Summary
In this tutorial, you’ll:
  • Learn about the role of classes in organising code
  • Learn about accessing data in different places using the dot operator (for example, variables inside other variables)
  • Review examples of dot operator use in the SpawnerSample script
  • Review the use of class as a type
When you’ve finished, you’ll be ready to write your own class for the SpawnerSample script.
Select your Unity version
Last updated: November 01, 2023
2022.3
2021.3
2020.3
2020.2
2020.1
2019.4
2019.3
2019.2
Language
English
Introduction to classes