Before we continue, there are few more things to learn.
Later in the book, we will use both static variables and inheritance. These are topics related with C# more than with Unity, but they are important if you want to become a good game developer. Next, you can find a very brief explanation, but I recommend that you learn them properly from a C# book.
Finally, there is probability, which is a topic of math, as we discussed previously, and it is essential in game development. However, once you know the basics of probability, you should be able to generate random numbers in Unity.
Some classes (or components, in the case of Unity), contain variables, which eventually can be set in the Inspector or changed at runtime. However, the whole class can share a variable among all its instances. Such variables are referred to as static variables and are declared with the static
keyword. A common use is to share a reference to another component, which all the...