COVID-19 Support:
We’re providing all users three months of complimentary access to Unity Learn Premium.
Just log in to start learning.

Introduction to the public keyword and inheritance

Tutorial
Beginner
20 Mins
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.
Recommended Unity versions
2019.2
Industry
Language
English
Tutorial
Introduction to the public keyword and inheritance
13
Introduction to the public keyword and inheritance