Using the example of the mailbox, if I asked you to see what is in the mailbox, the first thing you'd ask is, "Which one?" If I say in the Smith mailbox, the brown mailbox, or the round mailbox, you'll know exactly which mailbox to open to retrieve what is inside it. Similarly, in scripts you have to give your variables a unique name. Then I can ask you what's in the variable named myNumber, or whatever cool name you might use.
Let's see how this is represented in our code. The first thing we need to do is create a new script in Unity, all the fun and magic starts here from these first steps:
- In the Unity project panel, under the Assets tab, we are going to right–click the empty space:
- Then we go to the Create menu and ...