Working with Variables
Variable Types
The rest of the Variable types
Using Variables and Debug.Log in the Console
Assignment
In Unity
1. Create an empty GameObject named CodingFirstAssignment
2. Add a C# script onto it
3. Open the script to Visual Studios
In Visual Studios add the following to the script
1. Create an int variable named x, initialize the value 3 into it
2. Create an int variable named y, initialize the value 5 into it
3. Create an int Variable name NumSum.
4. in the Start Function print out, to the console, this message
"This is the adding program that I (insert your name) have made"
5. in the Start Function print out, to the console, this message
"Adding the numbers"
6. Add the int variable x and y and put the result into NumSum.
7. in the Start Function print out the number in NumSum.
1. Create an empty GameObject named CodingFirstAssignment
2. Add a C# script onto it
3. Open the script to Visual Studios
In Visual Studios add the following to the script
1. Create an int variable named x, initialize the value 3 into it
2. Create an int variable named y, initialize the value 5 into it
3. Create an int Variable name NumSum.
4. in the Start Function print out, to the console, this message
"This is the adding program that I (insert your name) have made"
5. in the Start Function print out, to the console, this message
"Adding the numbers"
6. Add the int variable x and y and put the result into NumSum.
7. in the Start Function print out the number in NumSum.