December 2017
Beginner
290 pages
7h 17m
English
For this example, we are going to create a new script called Person and the first thing that we need to do is to remove the default MonoBehaviour from our code:

By removing the MonoBehaviour part, we are saying that this script is a class named Person. The main reason is that we treat the Person class as a simple container of the data, a C# object of type Person, not a Unity Component. We don't need this class to be a full–spec Unity Component.
Then we can add any type of information that we want: string, int, bool, and so on. For this example, we have written some basic information that we can ask about a person:
As you can see, ...
Read now
Unlock full access