Using multiword variable names
Let's use the same example again, as follows:
public bool areRoadConditionsPerfect = true;
You can see that the variable name is actually four words squeezed together. Since variable names can be only one word, begin the first word with a lowercase and then just capitalize the first letter of every additional word. This greatly helps create descriptive names that the viewer is still able to read. There's a term for this, it's called camel casing.
I have already mentioned that for public variables, Unity's Inspector
will separate each word and capitalize the first word. Go ahead! Add the previous statement to the LearningScript
and see what Unity does with it in the Inspector
panel.