-
Book Overview & Buying
-
Table Of Contents
-
Feedback & Rating

Learning C# by Developing Games with Unity 3D Beginner's Guide
By :

Since myNumber
is a variable, the value it stores can vary. If we change what is stored in it, the answer to the equation will change too. Follow the ensuing steps:
You learned that a variable works by simple process of substitution. There's nothing more to it than that.
We didn't get into the details of the wording used to create myNumber
, or the types of variables you can create, but that wasn't the intent. This was just to show you how a variable works. It just holds data so you can use that data elsewhere in your script. We'll get into the finer details of variables in Chapter 3, Variables in Detail.
In the Inspector panel, try changing the value of myNumber
to some other value, even a negative value. Notice the change in answer in...
Change the font size
Change margin width
Change background colour