Hiring Partners
Segilola Resources Operating LimitedTaviatech TechnologiesFCMBMTN NigeriaAdvans La Fayette Microfinance BankAboki AfricaFirst Bank of NigeriaOPay
← Game Development With Unity · Lesson 4 of 8

Module Two

📖 Every lesson in this course is free to read right here, no account needed. Create a free account to track your progress, take the exam, and earn your certificate.
4
Module Two · Game Development with Unity

🧱 Module Two · Game Objects and Components


📖 Module Introduction

Hello, future game developer! In Module One, we learned the basics of Unity — what it is, how to install it, and how to use the interface. We learned about the Scene, Game, Hierarchy, Project, and Inspector panels. Now it is time to start building.

In this module, we will learn about Game Objects and Components. Game Objects are the things you see in your game — like characters, trees, and coins. Components are the features that make them work — like movement, colour, and behaviour. By the end of this module, you will be able to create and control objects in your game world.

🎯 Learning Objectives

  • Understand what Game Objects are.
  • Learn about Components and how they add functionality.
  • Learn about Transform — position, rotation, and scale.
  • Learn about Prefabs — reusable game objects.
  • Create and manipulate objects in the Scene.

📚 Warm-up Story · Tunde's First Character

Tunde is a young game developer in Abuja. He wanted to create a character for his game. He opened Unity and created a Game Object — a simple cube. He was excited to see it in the Scene.

But the cube was just a shape. It didn't do anything. He learned about Components. He added a Rigidbody component to make it fall with gravity. He added a script to make it move. The cube came to life.

Tunde then turned his cube into a Prefab so he could use it again in other levels. He was proud of his first character. He learned that Game Objects and Components are the building blocks of every game.

🧩 Main Lessons

Lesson 1 · What is a Game Object?

Definition: A Game Object is any object in your game — a character, a coin, a tree, or a light.

Why important: Everything in your game is a Game Object.

Simple explanation: A Game Object is like a toy that you place in your game world.

Real-life example: A character in a game is a Game Object.

School example: A student places objects in a scene.

Home example: A toy on a shelf.

Nigerian example: A player character in a Nigerian game.

Illustration:

    +----------------------+
    |  Game Object =       |
    |  Anything in your    |
    |  game                |
    |  → Cube             |
    |  → Player           |
    |  → Coin             |
    +----------------------+
            

Mini summary: A Game Object is any object in your game.


Lesson 2 · Creating a Game Object

Definition: You create a Game Object by right-clicking in the Hierarchy or using the GameObject menu.

Why important: This is how you add things to your game.

Simple explanation: Like adding a toy to a playroom.

Real-life example: A developer creates a cube in Unity.

School example: A student adds a sphere to the scene.

Home example: A hobbyist adds a cylinder.

Nigerian example: A developer creates a character.

Illustration:

    Create Object:
    1. Right-click in Hierarchy
    2. Choose 3D Object → Cube
    3. The cube appears in the scene
            

Mini summary: Create Game Objects to build your game.


Lesson 3 · What is a Component?

Definition: A Component is a feature that you add to a Game Object to give it functionality.

Why important: Components make Game Objects do things.

Simple explanation: Components are like superpowers for your objects.

Real-life example: A Rigidbody makes an object fall with gravity.

School example: A Light component makes the scene brighter.

Home example: A sound component plays music.

Nigerian example: A script component makes a character move.

Illustration:

    +----------------------+
    |  Component =         |
    |  Feature added to    |
    |  a Game Object      |
    |  → Transform        |
    |  → Rigidbody        |
    |  → Collider         |
    +----------------------+
            

Mini summary: Components add features to Game Objects.


Lesson 4 · Transform

Definition: Transform is a component that controls an object's position, rotation, and scale.

Why important: Every object needs a Transform to be placed in the world.

Simple explanation: It tells the object where to be, how to face, and how big to be.

Real-life example: A chair has a position, rotation, and size.

School example: A desk in a classroom has a location and orientation.

Home example: A TV is placed in a certain spot and angle.

Nigerian example: A character's position in a game level.

Illustration:

    Transform:
    📍 Position (x, y, z)
    🔄 Rotation (x, y, z)
    📏 Scale (x, y, z)
            

Mini summary: Transform controls position, rotation, and scale.


Lesson 5 · Position

Definition: Position is where the object is located in the world. It has X, Y, and Z coordinates.

Why important: You need to place objects in the right spot.

Simple explanation: It's like an address for your object.

Real-life example: A house has a street address.

School example: A student sits in a specific seat.

Home example: A bed is placed in a corner.

Nigerian example: A character starts at a specific point.

Illustration:

    Position:
    X = left/right
    Y = up/down
    Z = forward/backward
            

Mini summary: Position places an object in the world.


Lesson 6 · Rotation

Definition: Rotation controls which direction the object is facing.

Why important: You need objects to face the right way.

Simple explanation: It's like turning your head.

Real-life example: A person turns to look at something.

School example: A chair faces the teacher.

Home example: A TV is turned toward the sofa.

Nigerian example: A character faces the enemy.

Illustration:

    Rotation:
    X = tilt up/down
    Y = turn left/right
    Z = roll
            

Mini summary: Rotation controls the direction an object faces.


Lesson 7 · Scale

Definition: Scale controls the size of the object.

Why important: You need objects to be the right size.

Simple explanation: It's like making something bigger or smaller.

Real-life example: A poster can be small or large.

School example: A globe can be scaled up or down.

Home example: A photo can be enlarged or reduced.

Nigerian example: A character can be scaled to fit.

Illustration:

    Scale:
    X = width
    Y = height
    Z = depth
            

Mini summary: Scale controls the size of the object.


Lesson 8 · Prefabs

Definition: A Prefab is a reusable Game Object. You can save it and use it many times.

Why important: Prefabs save time and keep things consistent.

Simple explanation: Like a stamp — you use it to make many copies.

Real-life example: A coin prefab can be placed many times.

School example: A student uses a template for posters.

Home example: A cookie cutter makes many cookies.

Nigerian example: A character prefab is used in many levels.

Illustration:

    Prefab:
    🔁 Reusable
    📦 Save once, use many times
    ✅ Consistent
            

Mini summary: Prefabs are reusable Game Objects.


Lesson 9 · You Can Build with Game Objects!

Definition: You have learned the basics of Game Objects and Components.

Why important: You can now start building your game world.

Simple explanation: You know how to add and control objects.

Real-life example: You can create a simple scene.

School example: You can build a level for your game.

Home example: You can create a small game environment.

Nigerian example: You can build a Nigerian-themed game.

Illustration:

    +----------------------+
    |  You can build with  |
    |  Game Objects! 🎉   |
    |  → Create objects   |
    |  → Add components   |
    |  → Use prefabs      |
    +----------------------+
            

Mini summary: You are now ready to build with Game Objects!


📌 Key Vocabulary

  • Game Object: Any object in your game.
  • Component: A feature added to a Game Object.
  • Transform: Controls position, rotation, and scale.
  • Position: Where the object is.
  • Rotation: Which direction the object faces.
  • Scale: The size of the object.
  • Prefab: A reusable Game Object.
  • Rigidbody: A component that adds physics.
  • Collider: A component that detects collisions.
  • Scene: The game world where objects live.

🧠 Important Concepts

  • Game Objects are the building blocks: Everything in your game is a Game Object.
  • Components add functionality: They make objects do things.
  • Transform is essential: Every object has a Transform.
  • Prefabs save time: Reuse objects easily.
  • Build and experiment: The best way to learn is to create.

👣 Step-by-Step Explanations

How to Create and Move a Game Object in 5 Steps

  1. Create a Game Object: Right-click in Hierarchy → 3D Object → Cube.
  2. Select the object: Click on it in the Hierarchy.
  3. Change position: In the Inspector, change the X, Y, Z values.
  4. Change rotation: Adjust the Rotation values.
  5. Change scale: Adjust the Scale values.

How to Create a Prefab in 4 Steps

  1. Create a Game Object: Add a cube to the scene.
  2. Add components: Add a Rigidbody or Collider.
  3. Drag to Project panel: Drag the object from Hierarchy to Project.
  4. Use the Prefab: Drag the Prefab from Project to Scene.

Example:

    Create Object:
    Step 1: Right-click Hierarchy → Cube.
    Step 2: Click the cube.
    Step 3: Set Position to (2, 1, 0).
    Step 4: Set Rotation to (0, 45, 0).
    Step 5: Set Scale to (2, 2, 2).

    Create Prefab:
    Step 1: Create a sphere.
    Step 2: Add a Rigidbody.
    Step 3: Drag to Project panel.
    Step 4: Drag the Prefab into the scene.
            

🌍 Real-life Examples

  • Game Object: A character in a game.
  • Component: A Rigidbody for physics.
  • Transform: The position of a player.
  • Prefab: A coin used many times.
  • Scene: A game level.

🇳🇬 Nigerian Examples

  • Game Object: A character in a Nigerian game.
  • Component: A script to control movement.
  • Transform: The position of a player.
  • Prefab: A tree used many times.
  • Scene: A Nigerian village level.

🎈 Fun Examples children can relate to

  • Game Object: A toy in a toy box.
  • Component: A motor for a toy car.
  • Transform: Where a toy is placed.
  • Prefab: A cookie cutter.
  • Scene: A playground.

🏠 Everyday Examples

  • Game Object: A book on a shelf.
  • Component: A bookmark.
  • Transform: Where the book is.
  • Prefab: A key used many times.
  • Scene: A room.

👩‍🏫 Teacher Notes

  • Encourage students to create Game Objects.
  • Explain components with simple examples.
  • Demonstrate Transform changes.
  • Teach prefabs and their benefits.
  • Celebrate their creations.

👪 Parent Tips

  • Encourage your child to build scenes.
  • Discuss how objects in games work.
  • Help them create a simple character.
  • Celebrate their progress.
  • Make learning about game development fun.

🧐 Interesting Facts

  • Every object in a game is a Game Object.
  • Components can be added and removed.
  • Transform is the most used component.
  • Prefabs are used in almost every game.
  • Game Objects can have many components.

💡 Did You Know?

  • Did you know that a player is a Game Object?
  • Did you know that a coin is a Game Object?
  • Did you know that a tree is a Game Object?
  • Did you know that every Game Object has a Transform?
  • Did you know that Prefabs save a lot of time?

🧷 Remember This

  • Game Objects are the building blocks.
  • Components add features.
  • Transform controls position, rotation, and scale.
  • Prefabs are reusable.
  • Build and experiment.

⚠️ Common Mistakes

  • Not selecting the object: Changing the wrong object.
  • Not using Transform: Not moving or scaling objects.
  • Not using Prefabs: Creating duplicates manually.
  • Not saving: Losing work by not saving.
  • Not experimenting: Not trying new things.

✅ Best Practices

  • Use descriptive names for objects.
  • Use Prefabs for repeated objects.
  • Adjust Transform values carefully.
  • Save your scene regularly.
  • Experiment and have fun.

🎨 Illustrations, Diagrams & Tables

Game Object with Components

    +----------------------+
    |  Game Object (Cube)  |
    |  → Transform         |
    |  → Mesh Filter       |
    |  → Mesh Renderer     |
    |  → Box Collider      |
    +----------------------+
            

Transform Values

PropertyDescription
PositionLocation in world
RotationDirection facing
ScaleSize

Prefab Example

    Prefab: Coin
    → Use in many places
    → Consistent size and behaviour
    → Easy to update
            

📝 End-of-Module Summary

In this module, we learned about Game Objects and Components. We discovered that Game Objects are the building blocks of any game, and Components add functionality to them. We learned about Transform — position, rotation, and scale — and how to use Prefabs to reuse objects. With this knowledge, you can now start building your own game world. Great job!

❓ Frequently Asked Questions (10)

  1. What is a Game Object? Any object in your game.
  2. What is a Component? A feature added to a Game Object.
  3. What is Transform? Controls position, rotation, and scale.
  4. What is Position? Where the object is.
  5. What is Rotation? The direction the object faces.
  6. What is Scale? The size of the object.
  7. What is a Prefab? A reusable Game Object.
  8. How do you create a Game Object? Right-click in Hierarchy.
  9. How do you add a Component? Click Add Component in Inspector.
  10. Why use Prefabs? To save time and stay consistent.

📋 Review Questions (15)

  1. What is a Game Object?
  2. What is a Component?
  3. What does Transform do?
  4. What is Position?
  5. What is Rotation?
  6. What is Scale?
  7. What is a Prefab?
  8. How do you create a Game Object?
  9. How do you add a Component?
  10. Why use Prefabs?
  11. What is the most common Component?
  12. What does a Rigidbody do?
  13. What does a Collider do?
  14. What is a scene?
  15. What is the first step in creating a game object?

✏️ Fill-in-the-Blank Exercises

  1. A ______________ is any object in your game. (Game Object)
  2. A ______________ adds functionality to a Game Object. (Component)
  3. ______________ controls position, rotation, and scale. (Transform)
  4. ______________ is the location of an object. (Position)
  5. A ______________ is a reusable Game Object. (Prefab)

✅ True or False Exercises

  1. A Game Object is only a character. (False)
  2. A Component adds features to a Game Object. (True)
  3. Transform controls position only. (False)
  4. Position tells where an object is. (True)
  5. Prefabs are not reusable. (False)

🔘 Multiple Choice Questions (15)

  1. What is a Game Object?
    a) Any object in your game ✅
    b) Only the player
    c) Only coins
  2. What is a Component?
    a) A feature added to a Game Object ✅
    b) A type of object
    c) A game level
  3. What does Transform control?
    a) Position, rotation, scale ✅
    b) Only position
    c) Only scale
  4. What is Position?
    a) Where the object is ✅
    b) The size of the object
    c) The direction it faces
  5. What is Rotation?
    a) Where the object is
    b) The size of the object
    c) The direction it faces ✅
  6. What is Scale?
    a) Where the object is
    b) The size of the object ✅
    c) The direction it faces
  7. What is a Prefab?
    a) A reusable Game Object ✅
    b) A type of component
    c) A game level
  8. How do you create a Game Object?
    a) Right-click in Hierarchy ✅
    b) Click File
    c) Press Play
  9. How do you add a Component?
    a) Click Add Component in Inspector ✅
    b) Right-click in Hierarchy
    c) Press Play
  10. Why use Prefabs?
    a) To save time ✅
    b) To make things harder
    c) To delete objects
  11. What is the most common Component?
    a) Transform ✅
    b) Rigidbody
    c) Collider
  12. What does a Rigidbody do?
    a) Adds physics ✅
    b) Adds colour
    c) Adds sound
  13. What does a Collider do?
    a) Detects collisions ✅
    b) Adds colour
    c) Adds sound
  14. What is a scene?
    a) A game level ✅
    b) A game object
    c) A component
  15. What is the first step in creating a game object?
    a) Create it ✅
    b) Add a component
    c) Play the game

🔗 Matching Exercises

Match the word with its meaning:

WordMeaning
1. Game ObjectA) The size of an object
2. ComponentB) Any object in your game
3. TransformC) A reusable Game Object
4. ScaleD) A feature added to an object
5. PrefabE) Controls position, rotation, scale

(Answers: 1-B, 2-D, 3-E, 4-A, 5-C)

📝 Short Answer Questions

  1. What is a Game Object and give an example?
  2. What does Transform do?
  3. What is a Prefab and why is it useful?

🎭 Scenario-based Exercises

Scenario 1: You want to place a tree in your game. What would you create?

Scenario 2: You need to place 100 coins in your game. What would you use to save time?

👥 Group Activity

In groups of 3, create a simple scene with at least 5 Game Objects. Use different sizes, positions, and rotations. Share your scene with the class.

🧑‍🎓 Individual Activity

Create a simple scene with a cube, sphere, and cylinder. Change their position, rotation, and scale. Save the scene.

🗣️ Classroom Discussion Questions

  • What is the most important Component?
  • Why are Prefabs useful?
  • What would you like to build with Game Objects?

🛠️ Mini Project

Create a scene with 10 Game Objects. Use at least 3 different shapes. Create a Prefab and use it at least 3 times. Save and share your scene.

📁 Practical Assignment

Create a Prefab of a coin. Place 5 coins in your scene. Change their positions and rotations. Save the scene.

🏆 Challenge Exercise

Create a scene with a character (cube), obstacles (spheres), and collectibles (prefab coins). Arrange them in an interesting way. Save the scene.

🔑 Quiz Answers

Fill-in-the-blank: 1-Game Object, 2-Component, 3-Transform, 4-Position, 5-Prefab

True/False: 1-F, 2-T, 3-F, 4-T, 5-F

Matching: 1-B, 2-D, 3-E, 4-A, 5-C

🎁 Key Takeaways

  • Game Objects are the building blocks of your game.
  • Components add functionality.
  • Transform controls position, rotation, and scale.
  • Prefabs are reusable and save time.
  • Build and experiment to learn.

🚀 Preparation for the next module

In Module Three, we will learn about C# scripting. We will write code to make our Game Objects move and interact. Before the next session, think about how you would like your character to move.

See you in Module Three! 🎉


End of Module Two · Game Objects and Components

🏆 Get Certified

🔒

Earn this certificate

Every lesson is already free to read. Sign up, finish the lessons, pass the exam (₦2,000 or 20,000 coins), and get a verified certificate with your name on it.

🎓 Sign Up to Get Certified
🛠️ Practice Tools
Hands-on simulators & labs - subscription required.
→
🎯 Internship Tasks
Real-world tasks to build your portfolio - unlock them with a subscription.
→