Legacy Documentation: Version 5.4
Scenes
GameObject

GameObjects

The GameObject is the most important type of object in Unity. It is very important to understand what a GameObject is, and how it can be used.

What are GameObjects?

Every object in your game is a GameObject. However, GameObjects don’t do anything on their own. They need special properties before they can become a character, an environment, or a special effect. But each of these objects do very different things. If every object is a GameObject, how do we differentiate an interactive power-up object from a static room? What makes these GameObjects different from each other?

Four different Game Objects, an animated character, a light, a tree and an audio source
Four different Game Objects, an animated character, a light, a tree and an audio source

The answer to this question is that GameObjects are containers. They can hold the different pieces that are required to make up a character, a light, a tree, a sound, or whatever else you would like to build. So to really understand GameObjects, you have to understand these pieces which are called Components.

Depending on what kind of object you want to create, you will add different combinations of Components to the GameObject. Think of a GameObject as an empty cooking pot, and Components as different ingredients that make up your recipe of gameplay. Unity has lots of different built-in component types, and you can also make your own Components using Scripts.

This section explains how Game Objects, Components and Scripts fit together, and how to create and use them.

Scenes
GameObject