Skip to Main Content






Unity tutorial

End Screen

Click on File > New Scene 

Click on File > Save As > save it in the scenes folder as "End Screen"

Right-click on the Hierarchy window > UI > Canvas

Right-click on the Canvas > UI > Panel, name it "Background"

  • From the "Space Background > Sprites > Background" folder, drag "Space Background 6" to image placeholder in Background
  • Under Image, click color and change the Alpha value to 255
  • Under Rect Transform, Change the Y-scale to 2, Top to 300, Bottom to -300

Confirm that the background covers the screen by clicking on the Game tab

 

In the Gradient folder, right-click > Create > TextMeshPro > Color Gradientname it "Red-Black", in the Inspector window:

  • Select the "Four Corners Gradient"
  • For the colors copy the following color codes:
    • Top Left and Top Right: #E94E4EFF
    • Bottom Left and Bottom Right: #591515FF

 

Right-click on Canvas > Button - TextMeshPro

Right-click the "Button" > Rename > name it "MenuButton", in the Inspector window:

  • Under Rect Transform, change PosX to 0, PosY to 0, Width to 200, Height to 70
  • Under Image, click on Color, change it to black
  • Under Button, change the Alpha level of Normal Color to 0, Highlighted Color to 120, Pressed Color to 200, Selected Color to 0, Disabled Color to 0

Click on the dropdown > click on Text (TMP), in the Inspector window:

  • Change the text to "Menu"
  • Change the font size to 60
  • Change the Vertex Color to white
  • Check the Bold button in the Font Style
  • Check the Color Gradient box, from the Gradient folder, drag the "Red-Black" color gradient into the placeholder
  • Check the Underlay box at the bottom
    • Click on "Click to expand" and change the Offset X to 1, Offset Y to -1, Softness to 0.6

 

Right-click on the Canvas > UI > Text - TextMeshPro

Rename it to "Game Over", in the Inspector window:

  • Change PosX to 0, PosY to 200, Width to 500, Height to 100
  • Change the text to "Game Over"
  • Change Font Size to 70
  • Check the Bold button in the Font Style
  • Check Alignment Center and Middle
  • Check the Color Gradient box, from the Gradient folder, drag the "Red-Black" color gradient into the placeholder
  • Check the Underlay box at the bottom
    • Click on "Click to expand" and change the Offset X to 1, Offset Y to -1, Softness to 0.6

 

Right-click on the "Game Over" > Duplicate, rename it to "Score", in the Inspector window:

  • Change PosX to -400, PosY to -220, Width to 200, Height to 50
  • Change the text to "Score:"
  • Change Font Size to 40