Prefab Inheritance

Hi all,

I’m somewhat confused about the prefab inheritance. From this link
http://docs.unity3d.com/Documentation/Manual/Prefabs.html

Which by my understanding is Unities official documentation, it announces that you can most definitely have a prefab extend another prefab. It doesn’t say how though.

This post however
http://forum.unity3d.com/threads/146935-parenting-a-prefab states that it’s not doable.

So, which one’s right, and if it’s the official documentation, how is it done?

Thanks in advance.

when you have a prefab inside assets folder, any edits you make to this prefab in the Assets folder will also be reflected to the ones used in the scenes… so you can edit one prefab from assets folder and see it applied through your all scenes…
if you are seeing your object name in hierarchy appearing in blue, it means that it is already linked to a prefab in assets… and if you asking about how to make a prefab… just drag drop your game object it in assets folder and it will turn blue… which is an indication that it is now a prefab…

the second link is a workaround for those who wants to have nested prefabs inside prefabs, unity doesn’t support that from editor… so as a workaround…you can try doing that through scripts and only will occur at run time.

note that Unity editor sometimes doesn’t allow you to make some edits to prefab in certain situations, this is some kind protection for prefabs so they maintain their original form in assets folder…which is good…

if you plan editing prefabs in scripts during runtime, try to clone them first…
because prefabs can also be altered/deleted permanently from asset folder if you are referencing them directly in the assets folder in script.

1 Like

I don’t know whether or not you can actually extend prefabs, but here is another very similar way to achieve the same results you desire.

http://cardboardkeep.com/dev-blog-inheritance-in-unity-3d/

http://forum.unity3d.com/threads/236719-Prefab-Evolution-Plugin?p=1572475#post1572475

This plugin allow prefab/model nesting and inheritance…