Summary
A prefab is a reusable asset stored in the Project window. A scene instance is one copy of that prefab placed or spawned in a scene. This distinction matters because beginner bugs often come from editing the wrong thing: changing the prefab asset affects future and linked instances, while changing one scene instance may only create an override on that copy. (course lab series, see source-csharp-unity-labs)
Comparison table
| Dimension | Prefab asset | Scene instance |
|---|---|---|
| Where it lives | Project window | Hierarchy |
| Role | Reusable template | One actual object in the current scene |
| Created by | Dragging a GameObject into Project, or saving a prefab | Dragging prefab into scene, or Instantiate |
| Edited for | Shared default behaviour | Local placement or override |
| Runtime existence | Asset does not run by itself | Instance exists and can run scripts |
| Common reference field | coinPrefab | coin, spawnedCoin, enemyInstance |
When to edit the prefab
Edit the prefab asset when:
- all coins, enemies or pickups should share the same default components
- a script or collider needs to be present on every future copy
- the default sprite, tag, layer or child object should be consistent
Prefab edits are powerful because they reduce repeated scene work.
When to edit the scene instance
Edit a scene instance when:
- one copy needs a different position, rotation or local value
- a level designer is placing objects by hand
- a runtime script has spawned a copy and now needs to name, parent or configure it
In code, Instantiate(prefab, position, Quaternion.identity) returns the new scene instance. Store that return value if later code needs to change or destroy that specific object.
Related
unity-prefabs · unity-prefabs-scripting · instantiate · gameobject · component · overview-beginner-2d-unity-route