Version: Unity 7.0 Alpha (7000.0)
Language : English
Edit prefab assets
Create variations of prefabs

Nest prefab instances in other prefabs

You can include prefab instances inside other prefabs. Prefab instances included in other prefabs are called nested prefabs. Nested prefabs keep their links to their own prefab assets, while also forming part of another prefab asset.

You can add nested prefabs in prefab editing mode, or from the Hierarchy view.

Add a nested prefab in prefab editing mode

  1. Select the prefab you want to edit, and open prefab editing mode.
  2. Drag another prefab into the Hierarchy or Scene view. You can also add any overrides to these prefab instances.

Add a nested prefab from the Hierarchy

You can add a prefab instance as a child of another prefab in the Hierarchy view.

  1. In the Hierarchy, select the dropdown arrow next to the prefab you want to edit.
  2. Drag a prefab from the Project window into the prefab’s hierarchy.
An enemy bot variant prefab, with a nested Weapon Blaster prefab, and a recently added Banana prefab override.
An enemy bot variant prefab, with a nested Weapon Blaster prefab, and a recently added Banana prefab override.

The nested prefab is applied as an override to the parent prefab asset, indicated by a green plus icon. You can optionally apply these override changes permanently to the parent prefab asset. For more information, refer to Apply overrides to the prefab asset.

Additional resources

Edit prefab assets
Create variations of prefabs
Copyright © 2023 Unity Technologies
优美缔软件(上海)有限公司 版权所有
"Unity"、Unity 徽标及其他 Unity 商标是 Unity Technologies 或其附属机构在美国及其他地区的商标或注册商标。其他名称或品牌是其各自所有者的商标。
公安部备案号:
31010902002961