Lesson Overview
Build a simple 2D game environment using sprites and GameObjects. Learn to create, organize, position, resize, and customize objects within a Unity scene.
Project: Treasure Collector — a static scene with a player, platforms, obstacles, coins, and a goal. Movement and collisions will be introduced in later lessons.
Essential question: How are GameObjects, sprites, and Transform components used to construct a 2D video game scene?
Learning objectives
- Create and save a new Unity scene.
- Explain scenes, GameObjects, sprites, and components.
- Add and customize 2D sprites.
- Position, rotate, and resize objects using Transform.
- Organize objects with meaningful names.
- Create a complete scene visible in Game view.
Part 1 — Review Unity Concepts (10 minutes)
| Concept | Definition | Example |
|---|---|---|
| Scene | A collection of objects forming a game environment. | Level 1 |
| GameObject | An object placed in a Unity scene. | Player, coin |
| Sprite | A 2D graphic displayed in the game. | Coin image |
| Transform | Controls position, rotation, and scale. | X = -3 |
| Sprite Renderer | Displays sprites and controls their visible color. | Blue player |
Part 2 — Open Your Unity Project (5 minutes)
- Open Unity Hub.
- Open
PX_Interface_lastnamefrom Lesson 1. - Select File → New Scene.
- Choose a basic 2D scene template if prompted.
- Select File → Save As.
- Save as
PX_Scene_lastnameinAssets/Scenes.
Part 3 — Create the Environment (20 minutes)
Activity A: Ground
- Right-click in Hierarchy.
- Choose 2D Object → Sprites → Square (menu names may vary slightly by version).
- Rename to
Ground. - In Inspector → Transform, enter the values below.
- In Sprite Renderer, change the color to green.
| Property | Value |
|---|---|
| Position (X, Y, Z) | (0, -4, 0) |
| Scale (X, Y, Z) | (16, 1, 1) |
Activity B: Player
Create another Square sprite and set:
| Name | Position (X,Y,Z) | Scale (X,Y,Z) | Color |
|---|---|---|---|
| Player | (-5,-3,0) | (1,1,1) | Blue |
Activity C: Platforms
Create two additional Square sprites:
| Name | Position (X,Y,Z) | Scale (X,Y,Z) | Color |
|---|---|---|---|
| Platform1 | (-2,-1.5,0) | (3,0.4,1) | Brown |
| Platform2 | (2,0.5,0) | (3,0.4,1) | Brown |
Part 4 — Coins, Obstacles, and Goal (15 minutes)
Activity D: Coins
- Create a 2D Object → Sprites → Circle.
- Rename it
Coin1and change its color to yellow. - Enter the Transform settings below.
- Duplicate with Ctrl + D, rename, and reposition the other coins.
| Name | Position (X,Y,Z) | Scale (X,Y,Z) |
|---|---|---|
| Coin1 | (-2.5,-0.9,0) | (0.4,0.4,1) |
| Coin2 | (-1.5,-0.9,0) | (0.4,0.4,1) |
| Coin3 | (1.5,1.1,0) | (0.4,0.4,1) |
| Coin4 | (2.5,1.1,0) | (0.4,0.4,1) |
Activity E: Obstacles
Create two Triangle sprites (or red Square sprites if Triangle is not available). Color both red.
| Name | Position (X,Y,Z) | Scale (X,Y,Z) |
|---|---|---|
| Obstacle1 | (0,-3,0) | (1,1,1) |
| Obstacle2 | (1,-3,0) | (1,1,1) |
Activity F: Goal
Create a yellow Square sprite named Goal with Position (5,-2.75,0) and Scale (0.8,1.5,1).
Part 5 — Organize the Hierarchy (5–10 minutes)
Verify that your Hierarchy contains these GameObjects:
Discussion: Why are meaningful names more useful than Square (1) or Circle (2)?
Part 6 — View and Save (10 minutes)
- Select
Main Camera. - Confirm Projection = Orthographic.
- Adjust camera Orthographic Size if needed.
- Switch to the Game tab.
- Verify every object is visible.
- Press Play to preview, then press Play again to stop.
- Press Ctrl + S to save.
Part 7 — Knowledge Check
Answer all five questions, then click Grade Quiz for your score and explanations.
Part 8 — Assignment Submission
Submit your screenshots to Google Classroom.
0 of 8 completed
Grading Rubric
| Category | Points |
|---|---|
| Scene created and saved correctly | 10 |
| Player and ground | 15 |
| Platforms | 15 |
| Coins | 15 |
| Obstacles and goal | 15 |
| Correct Transform properties | 10 |
| Organized Hierarchy and screenshots | 10 |
| Knowledge check | 10 |
| Total | 100 |
Teacher Notes
Prerequisites: Lesson 1 completed; Unity Hub and Unity Editor installed. Students should save active Unity projects locally rather than in synced cloud/network folders.
Common issues: Students accidentally create 3D cubes instead of 2D sprites, or the camera does not frame their objects. Avoid Rigidbody 2D, Collider 2D, and C# scripting during this introductory lesson.
Early-finisher challenge: Add three decorative objects (trees, clouds, or stars), name each one, and adjust its color and scale.
Next lesson: Introduction to Unity 2D Physics — Rigidbody 2D and Collider 2D.