Skip to main content
Mr. Helland
  • Home
  • Calendar
  • More
English
Deutsch English Español Français Tiếng Việt Русский العربية 简体中文
You are currently using guest access
Log in
Mr. Helland
Home Calendar
Expand all Collapse all
  1. 3D Game Prog
  2. 3️⃣User Interfaces
  3. 14: Mining for Diamonds (Part 2)

14: Mining for Diamonds (Part 2)

Completion requirements
Make a submission
Due: Friday, December 5, 2025, 11:59 PM

Learning Target

  • Create a UI for a game in Unity that works for multiple game resolutions
  • Use anchors and pivots to control the appearance of a Unity UI

 


Resources

Video Tutorial
    • Unity UI Canvas Anchors explained
Starter Icons
    • starter_icons.zip


Instructions

Step 1: 

Open your existing project from Part 1. 

Add a subfolder to your Textures asset folder called UI. Here is an example with textures organized into several folders:

Step 2:

Download the starter files and unzip the archive.
Drop the files you plan to use into the Textures→UI folder.

Each of these files will need to be changed to be a Sprite.

 

Step 3:

When we are done we will have a few different UI parts.

Create two UI panels to organize the screen.

    • Main UI (top or bottom)
    • Selected Drill UI (side)

For example:

 

Step 4:

We will need to do 3 basic things with our UI:

    • Show the values of variables
    • Allow the drill to be upgraded
    • Exit the program gracefully

To make life easier, I suggest using these to create a custom display:

    • Panel
    • Image
    • Text

Here is an example of a money display:

Then, drag it into the Prefabs folder so you can easily reuse it by simply changing the icon image.

 

Step 5:

I used these things to create a combined display and upgrade display:

    • Panel
    • Image
    • Text
    • Button (with text element deleted)

For example:

Once again, drag it into the Prefabs folder so you can easily reuse it by simply changing the icon and button images.

Step 6:

Finish creating a main UI that contains these items:

    • Money earned
    • Number of drills owned
    • Total rocks, iron, silver, gold and gems collected
    • Button to close game 

For example:

Step 7:

Finish creating a selection UI that contains these items:

    • Displays for speed, power and cooling
    • Buttons to upgrade speed, power and cooling

Step 8:

You could also add these to your selected drill UI to give it more realism:

    • Rocks, iron, silver, gold and gems currently in the selected drill's hopper or dirt pile
    • Current rotational speed, power in horsepower and temperature


Grading

For grades A to D, all requirements need to be met for that grade band. 

Indicators and Collectibles  Letter Grade 
  • All requirements of an A
  • Several of these are used to give the UI a customized and unique appearance:
    • Icons
    • 9-Sliced backgrounds or icons
    • Fonts
A+
  • There are 2 or more clearly defined UI regions
    • There is a consistent theme
    • Elements are organized and consistently spaced
  • 10+ text controls display useful dynamic information
    • Player money/score is required
    • All text is paired with a related icon
  • There are at least 4 buttons
    • One button should close the game window
    • Other buttons should change the player experience (e.g. upgrades, power ups)
    • All buttons include an image
    • Text is optional
  • The UI is functional at these screen resolutions (HD, WXGA, FHD, QHD)
A
  • There are 2 or more clearly defined UI regions
    • There is a consistent theme
    • Elements are organized and consistently spaced
  • 8+ text controls display useful dynamic information
    • Player money/score is required
    • All text is paired with a related icon
  • There are at least 3 buttons
    • All buttons should change the player experience (e.g. upgrades, power ups)
    • All buttons include an image
    • Text is optional
  • The UI is functional at these screen resolutions (WXGA, FHD, QHD)
B
  • There are 2 or more clearly defined UI regions
    • There is a consistent theme
    • Elements are organized and consistently spaced
  • 6+ text controls display useful dynamic information
    • Player money/score is required
    • All text is paired with a related icon
  • There are at least 3 buttons
    • Buttons should change the player experience (e.g. upgrades, power ups)
  • The UI is functional at two of these screen resolutions (WXGA, FHD)
C
  • There is a clearly defined UI region
  • 4+ text controls display useful dynamic information
    • Player money/score is required
    • All text is paired with a related icon
  • There are at least 2 buttons
    • Buttons should change the player experience (e.g. upgrades, power ups)
  • The UI is functional at one of these screen resolutions (WXGA, FHD)
D
Doesn't meet above criteria  Reassigned

◄ 13: Mining for Diamonds (Part 1)
You are currently using guest access (Log in)
Get the mobile app
Powered by Moodle