In Unity’s PrefabAn asset type that allows you to store a GameObject complete with components and properties. The prefab acts as a template from which you can create new object instances in the scene. More info
See in Glossary system, Prefab Assets act as templates. You create Prefab Assets in the Editor, and they are saved as an Asset in the Project window. From Prefab Assets, you can create any number of Prefab instances. Prefab instances can either be created in the editor and saved as part of your ScenesA Scene contains the environments and menus of your game. Think of each unique Scene file as a unique level. In each Scene, you place your environments, obstacles, and decorations, essentially designing and building your game in pieces. More info
See in Glossary, or instantiated at runtime.
To create a Prefab Asset, drag a GameObject from the Hierarchy window into the Project window. The GameObject, and all its components and child GameObjectsThe fundamental object in Unity scenes, which can represent characters, props, scenery, cameras, waypoints, and more. A GameObject’s functionality is defined by the Components attached to it. More info
See in Glossary, becomes a new Asset in your Project window. Prefabs Assets in the Project window are shown with a thumbnail view of the GameObject, or the blue cube Prefab icon, depending on how you have set up your Project window.
This process of creating the Prefab Asset also turns the original GameObject into a Prefab instance. It is now an instance of the newly created Prefab Asset. Prefab instances are shown in the Hierarchy in blue text, and the root GameObject of the Prefab is shown with the blue cube Prefab icon, instead of the red, green and blue GameObject icon.
You can create instances of the Prefab Asset in the Editor by dragging the Prefab Asset from the Project viewA view that shows the contents of your Assets folder (Project tab) More info
See in Glossary to the Hierarchy or Scene viewAn interactive view into the world you are creating. You use the Scene View to select and position scenery, characters, cameras, lights, and all other types of Game Object. More info
See in Glossary.
You can also create instances of Prefabs at runtime using scripting. For more information, see Instantiating Prefabs.
2018–07–31 Page published
Nested Prefabs and Prefab Variants added in 2018.3