Skip to content

Lesson 6

Add Component

Components give a GameObject new powers. Find the Add Component button and use it.

10 minDraft

Draft lesson: nobody has followed it from start to finish in the editor yet, so a step may not match what you see.

Video coming soon

We are making a video for this lesson. For now, follow the steps below!

In this lesson you will

  • Know what a component is
  • Find the Add Component button
  • Search for a component and add it

What is a component?

A component is a power you give to a GameObject.

ComponentIts power
Sprite RendererShows a picture
Physics BodyMakes it fall and bump
ScriptRuns your code
Audio SourcePlays a sound
TextShows words

Find the button

  1. Click a GameObject in the Hierarchy.
  2. In the Inspector, click Add Component.

Picture coming soonThe Add Component button in the Inspector

Choose a component

A window opens. Type in the search box, or look through the groups. Click a component to add it.

Picture coming soonThe Add Component window

The new component shows up in the Inspector, under the Transform.

Some powers need a shape

A Physics Body needs a shape first, like a Box Collider. Add the shape, then the body.

Try this

  • Add a Text component to a GameObject. Write your name in it!
  • Open Add Component and search for camera. What do you find?

Try it here

Coming soon

Your mission

Open Add Component and give the sprite a Text.

Soon, a small piece of the editor will be right here, so you can practise without leaving the lesson. For now, try it in the editor!