Please enable JavaScript to use CodeHS

Game Development in Unity (3.9)

Unity Scripting Basics

Sharpen your Unity C# scripting skills. Students begin using the Unity scripting API with basic C# scripts in simple 2D Unity projects. They begin using functions, declaring variables, and defining classes.

Lessons

3.1 Scripting API

  • Unity Scripting API
  • Knowledge Check: Unity Scripting API
  • Explore Unity Docs
  • Script File Boilerplate Code
  • Create a New Script

3.2 Functions

  • The Game Loop
  • Knowledge Check: The Game Loop
  • Unity Demo: Console Debugging
  • Start vs. Update
  • Unity Demo: Script a Sprite
  • +3 more

3.3 Declaring Variables

  • Variables
  • Predict: Trace Variables
  • Play and Investigate: Trace Variables
  • Modify: Trace Variables
  • Make: Public and Private Variables

3.4 Defining Classes

  • Classes
  • Predict: Food Inventory
  • Play and Investigate: Food Inventory
  • Modify: Food Inventory
  • Make: Tool Inventory
  • +4 more

3.5 Player Controls

  • Unity Demo: Input Manager
  • Knowledge Check: Input Manager
  • Keyboard and Joystick Input
  • Unity Demo: Touchscreen Input
  • Touchscreen Input

Courses that include this module