Introducing the class
The class plays a major role in Unity. Most of your code will be written inside classes. Think about it like a container for variables and methods.
You just learned about variables and methods. These two items are the building blocks used in Unity scripts. The term "script" is used everywhere in discussions and documents. Look for it in the dictionary, and you will see that it can generally be described as written text. Sure enough, that's what we have. However, since we aren't just writing a screenplay or passing a note to someone, we need to learn the actual terms used in programming.
Unity calls the code it creates a C# script. However, people like me have to teach you some basic programming skills and tell you that a script is really a class.
Note
In the previous section about methods, we created a class (script) called LearningScript
. It contained a couple of variables and a method. The main concept, or idea, of a class is that it's a container of data, stored in variables...