September 2013
Beginner
292 pages
6h 19m
English
I'm sure you're wondering what the word public means at the beginning of a variable statement:
public int number1 = 2;
It means that the variable will be visible and accessible. It will be visible as a property in the Inspector panel so that you can manipulate the value stored in the variable. It also means it can be accessed from other scripts using the Dot Syntax. You'll learn more about the Dot Syntax in Chapter 6, Using Dot Syntax for Object Communication.