Module 1 Challenge

Tutorial

·

intermediate

·

+0XP

·

30 mins

·

(72)

Unity Technologies

Module 1 Challenge

This module covers the basics of getting started with the provided Unity project and creating an interactive main menu. Learners will explore the sample project, configure the Unity Input System, and implement functionality to navigate scenes using UI elements.

By the end of this module, learners will be able to:

  • Navigate the sample project structure and identify key assets.
  • Configure the Unity Input System to handle user inputs.
  • Create a main menu layout using Unity UI components.
  • Connect UI buttons to scripts for scene navigation.

1. Challenge

Challenge

Estimated Time: 30 minutes

In this challenge, create two new levels for the Cannon game.

Challenge Steps

  1. Open the Level_01 scene from the Scenes folder.
  2. Use the File > Save As menu option to save two new copies of the scene. Name them Level_02 and Level_03.
  3. Move the camera in both new scenes to a different location; press CTRL+SHIFT+F on Windows or COMMAND+SHIFT+F on MacOS. The camera will move to the position of your view in the Scene window.
  4. Open the File → Build Settings window and add the two new scenes to it.
  5. In your Main Menu scene, update the Level 2 and Level 3 buttons to load the newly created levels.

2. Bonus Challenge

Bonus Challenge

Update your MenuManager script to load levels based on the scene index. To do this, create a copy of the LoadLevel method and change the parameter to an integer named levelIndex. Pass that parameter to the SceneManager.LoadScene method. Finally, update your Main Menu scene to use the levelIndex version of the LoadLevel method.

Complete this tutorial