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

Components

  • Rigidbody and * Collider components are for physics

  • Mesh Filter and Mesh Renderer components are for 3D geometry

Tags

Layers

Last updated