GameObjects

A GameObject sits at the root of all the assets in your game. Without a GameObject, your asset cannot exist. Think of a GameObject as being the driver of a car. Even with a great car, a powerful engine, and a tank full of gas, without a driver, the car cannot get very far. We need that driver to control our car, or in our case drive our assets.

Once a GameObject is created, we can attach various behaviors (called “Components”) to it. Another good way of thinking about it is like the foundation of a house. We can create a foundation, and then build upon it with walls, windows, and doors. The walls, windows, and doors are the “Components” or details that help define it.

Get Learning 2D Game Development with Unity®: A Hands-On Guide to Game Creation now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.