Unity Learn home
View Project Content

Week 6: User Interface | Apr 27 - May 1

Project
Beginner
+600 XP
5 Hours
(20)
Overview
Summary
This week, you will program a game to test the player’s reflexes, where the goal is to click and destroy objects randomly tossed in the air before they can fall off the screen. In creating this prototype, you will learn how to implement a User Interface - or UI - into your projects. You will add a title screen with a difficulty select menu that will control how challenging the gameplay is, you will add a score display that will track how many points the player has earned, and you will add a Game Over screen, which will allow the player to restart and try again. In learning these skills, you will be able to create a fully “playable” experience that the user can enjoy from start to finish without having to restart the application to try it again.
Project Objective
By the end of this week, you will be able to:
  • Create a Game Manager object that controls game states
  • Detect where the user has clicked their mouse in order to create a click-based program
  • Use the Canvas to create UI elements like a Title, Buttons, or score display
  • Lock elements and objects into place on the UI with Anchors
  • Use variables and script communication to update elements in the UI
  • Make UI elements appear and disappear with .SetActive
  • Use script communication and Game states to implement working “Game Over” screen
  • Restart the game using a UI button and SceneManagement class
  • Add listeners to detect when a UI Button has been clicked and trigger functionality
  • Set difficulty of gameplay from title screen by passing parameters between scripts
Select your Unity version
Last updated: April 22, 2020
2018.4
Language
English