Overview

A Prefab is a reusable GameObject asset stored in the Project window. It lets a team define a coin, enemy, projectile, UI widget, or particle effect once, then create instances wherever needed. Prefabs are one of Unity’s most important workflow features because they turn repeated scene objects into reusable assets instead of manual duplication. (CRE132 Labs, see source-cre132-labs)

Setup

Typical prefab workflow:

  1. Build and configure a GameObject in a scene.
  2. Drag it into the Project window to create a prefab asset.
  3. Use that prefab in scenes or via runtime instantiation.

Key distinction:

ThingMeaning
Prefab assetThe reusable source definition in the Project window
Prefab instanceA copy placed in a scene or spawned at runtime

Usage

Prefabs are best for:

  • repeated enemies or pickups
  • reusable UI elements
  • particle/VFX bundles
  • projectiles and spawned hazards

The scripting counterpart is unity-prefabs-scripting, which covers Instantiate, tracking lists, and despawning.

Gotchas

  • Editing a prefab asset can change many scene instances at once.
  • Instance overrides can make one scene object behave differently from the source prefab; that is useful, but easy to forget when debugging.
  • Prefabs solve reuse, not communication. Scripts on prefab instances still need references, events, or managers to integrate with the rest of the game.

unity-prefabs-scripting · unity-inspector-references · unity-object-communication · unity-particle-system-scripting · source-cre132-labs