Game Objects and Components in Unity

Bharath N
2 min readAug 30, 2021

What is a Game Object in unity ?

It is like a container, which has components in it.

What are Components ?

Components defines the behavior of the Game Object, it adds up the functionality to the game object. “Main Camera” and “Directional Light” are the two default components that would be present whenever a user creates a new Scene .

When you create a game object a default “transform” component will be created, which has.

1. Position — Set the object to the required position.
2. Rotation — Rotates the object.
3. Scale — Alter the dimensions of an object.

How to create a game object ?

> Right click on the Hierarchy window > Create Empty .
On the right side, Inspector window components will be displayed
click on the “Add Component” to add a new component to the game object.

Tag

It helps to identify the game objects and makes easy accessible in the C# scripts.

Adding the tags to the Game Object.

Click on dropdown next to tag > Add Tag >

Click on the “+” button and give a required unique name and click on Save.

Come back to created Game object and on the Inspector window click on the drop down menu next to tag again.

There you can find the tag name that you would have created, select that tag.

Now you can see the tag selected tag name.

Thank you for reading.

--

--