Level 6: SCRIPTING CONTROL FLOW
Before You Begin (Unity Setup):
- Create a new Unity Project (called Level 6)
- Create one new folder in the Projects window (Scripts)
- Create a new scene (called L6Practice) saved in the Scenes folder
- Add a 3D cube to the scene
11/4/19 - Operators (Logical, Assignment, Relational, & Precedence)
- Open L6Practice
- Create a new C# script (called LogicalOperators) in your Scripts folder
- Watch "Operators Logical" (see video below)
- When you are done with the tutorial, now create a new C# script (called AssignmentOperators) in your Scripts folder
- Watch "Operators Assignment" (see video below)
- When you are done with the tutorial, now create a new C# script (called RelationalOperators) in your Scripts folder
- Watch "Operators Relational" (see video below)
- When you are done with the tutorial, now create a new C# script (called PrecedenceOperators) in your Scripts folder
- Watch "Operators Precedence" (see video below)
Assignment:
- After you finish watching the above tutorial, save the L6Practice scene.
- Create a new scene and save this scene as L6Assignments in your Scenes folder.
- Add a 3D cube into your scene.
- Create a new script for this assignment (called OperatorsReview) On Enable, the user will be able to publicly enter two random numbers (see Illustration 1 for how it would look in your Inspector Window). What would be shown in the Console Window is how these two numbers would be calculated if they were added, subtracted, multiplied, and divided together (see Illustration 2).