Please enable JavaScript to use CodeHS

Game Development in Unity

Description

Tapping into Unity’s API, students learn how to begin scripting for Unity projects. They’ll start working with the Unity API boilerplate code and create a new script file.

Objective

Students will be able to:

  • Access and navigate the Unity API Scripting documentation
  • Understand the basic C# boilerplate script produced by Unity
  • Create a new C# Unity script file
Description

Students learn about Unity’s C# functions/methods. Breaking down the common Unity script structure, students explore the Start( ) and Update( ) functions and discover the importance of the game loop.

Objective

Students will be able to:

  • Identify and use the Start( ) and Update( ) functions in the Unity script boilerplate C# files
  • Use code clues to predict the outcome of a Unity script
  • Investigate a Unity script and make modifications to create a new outcome
Description

In this lesson, students will continue working with basic scripts in Unity. They’ll begin declaring public and private variables, learn the differences of each, work more with Unity’s API, and trace variables to identify errors.

Objective

Students will be able to:

  • Trace variables to make predictions and identify possible errors
  • Declare public and private variables in Unity C# scripts
  • Adjust variables to improve performance in Unity projects
Description

Students will continue to work with basic scripts using Unity’s API classes and learn how to develop their own classes to make blueprints for cloned sprites and GameObjects.

Objective

Students will be able to:

  • Use Unity API classes in C# scripts
  • Define custom classes to use as blueprints for GameObjects
  • Explore the use of custom classes for cloning sprites and GameObjects
Description

In this lesson, students will explore the Unity Input Manager and reflect on different ways C# scripts can impact player device inputs.

Objective

Students will be able to:

  • Manage key and joystick inputs in Unity
  • Use scripts to get touchscreen values for player control