Unity Learn home
View Tutorial Content

Introduction to the public keyword and inheritance

Tutorial
Beginner
+10 XP
20 Mins
(65)
Overview
Summary
In this tutorial, you’ll:
  • Explore the public keyword, and the role this plays in code
  • Make a variable public and access it in Unity Editor
  • Explore the concept of inheritance and derived classes
When you’ve finished, you’ll be ready to create a custom effect for the health potions used in your 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 the public keyword and inheritance