Updating Prefabs

Prefabs can be updated like any other game object, except they are edited separately from the scene and changes are applied to each instance of the prefab.

Trying to update the children of a prefab in a scene will give you this error:

Accessing the Prefab Editor

There are a few ways to access the editor for a prefab object:

Through the Hierarchy Window

Click on the arrow to the right of the parent object's name to edit the prefab.

Through the Project Window

Double-click on the prefab to edit.

Through the Inspector Window

Click on the Open Prefab button to edit the selected prefab.

The Prefab Editor

When you are editing a prefab, the Hierarchy window shows the children objects and the Scene window shows a close up of the prefab with a solid background color.

Edit the game objects like you would any other game object.

Changes here will update all instances of the prefab when you click the back arrow in the Hierarchy window.

Unpack a Prefab

Maybe you only want to change one of the instances and not all.

You can "unpack" instances by right-clicking on the parent object in the prefab and clicking on an unpack option.

This will turn the prefab and its children gray, meaning they can be edited within the tab and without affecting other instances.

Updating prefab assets will not update the unpacked version of the prefab.

pageCreating Prefabs

Last updated