Unity Learn home
View Tutorial Content

Polymorphism and casting

Tutorial
Intermediate
+10 XP
15 Mins
(242)
Overview
Summary
Polymorphism is a feature of inheritance and one of the pillars of object-oriented programming. By the end of this tutorial, you’ll be able to:
  • Explain the basics of polymorphism, including its practical use in development.
  • Upcast and downcast to access different class functionality via polymorphism.
  • Use type checking to avoid errors.
  • Serialize variables correctly when you use polymorphism.
Select your Unity version
Last updated: November 01, 2022
2021.3
2019.3
2019.2
2019.1
2018.4
2018.3
2018.2
2018.1
2017.4
2017.3
2017.2
2017.1
5.x
4.x
Language
English
Also included in
Polymorphism and casting