Creating prefabs
A prefab is an object that isn't a part of a scene itself, but is designed to be copied into scenes during editing or at runtime. It can be copied many times to make many objects in the scene. At runtime, the copies have no special connection to the prefab or each other, and all copies can behave independently. Although the role of a prefab is sometimes likened to the role of a class, a prefab is not a type.
Even though prefabs are not part of a scene, they are created and typically edited through a scene. Let's create a sphere in the scene by selecting GameObject | 3D Object | Sphere from the menu bar. An object named Sphere should appear in the Hierarchy. Rename it SimulatedCircle. Drag each of the following assets from ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access