# Introduction

* The **Scene** view is where you'll manipulate and change things.
* When you enter Play Mode "▶", the Scene view changes into the **Game** view for testing.
* Everything in your game is called a **GameObject**.
* The **Hierarchy** is where you organize GameObjects.
* When you select a GameObject in the Hierarchy, you'll see it's **components** in the **Inspector**.
* Components contain **properties** that give a GameObject specific functionalities.
* **Prefabs** are templates for GameObjects with preset components. They are stored as assets.

> A **prefab** is an asset that acts as a template of a GameObject. From the prefab, you can create multiple copies, called **instances**. A change to the prefab asset causes all of its instances to change as well.

## GameObjects and Components

**GameObjects** is an object that lives in your scene. A GameObject is in fact only defined by its Components, think of it more as a container for Components.

**Components** are the building blocks that define a GameObject. **Scripts** are also components and are inherited from `MonoBehaviour` class.

Example:

* **`GameObject`** - `Cube`
  * **`Component`** - `Transform`
    * **`Variables`** - `Position`, `Rotation`, and `Scale`

{% embed url="<https://static.packt-cdn.com/products/9781849691444/graphics/1444_01_06.jpg>" %}

{% embed url="<https://miro.medium.com/v2/resize:fit:1100/format:webp/1*OaE79vJjDIU72Vsm6_4UDg.png>" %}
Traditional Hierarchy (OOP) vs Component Based Design
{% endembed %}

> **Components**
>
> * Rigidbody and \* Collider components are for physics
> * Mesh Filter and Mesh Renderer components are for 3D geometry

{% embed url="<https://youtu.be/2LSXHtl0Mss?si=qXEoJY0lOydMaKSg>" %}

Tags

Layers
