- Home /
Is this a prefab bug?
Just want to confirm before I report it
Make a prefab that has a child. Select the child, duplicate it. Now in the inspector for the new duplicate, it should say its a broken prefab connection. Now unparent this object, should still say its a broken prefab connection but the apply button should be greyed out. Click revert and it will replace the object with the prefab.
Answer by LaneFox · Jul 06, 2015 at 11:53 AM
I'm not really certain what you're asking but here is how prefabs work in this context.
Once you make a Scene object and drag it into the Project Hierarchy it takes a snapshot of that Scene object with all its data and children and pops it into the Project Hierarchy which is basically just a library of stuff.
Now when you make local changes in the Scene Hierarchy then you are not editing the Library entry (Prefab); you are editing an instance of it.
So yes, your cloned child object in the scene view is recognized as not part of the prefab and is therefore a broken instance. You can still press the Apply button to take all of the changes that you have made in the Scene instance and apply them to the Project Prefab.
If you press Revert, the prefab is reverted to the state of its prefab reference in the Project Hierarchy.
Changes to instanced prefabs do not affect the Prefab unless you Apply them.
I hope this answers your question.