When I break a prefab instance from the GameObject menu, the inspector still indicates that it’s a prefab. It still has the options to Select, Revert and Apply. Why is that?
This is by design.
There are different ways to break a prefab connection one of those is to rearrange the hierarchy or the components on a game object. Some times you want this to break the connection and stay broken, but sometimes you actually want to make those changes and apply them to the prefab and get all instances updated, this is why those buttons still appear.
Another useful use case is of course if you accidentally break the connection and want to revert to the prefab. If the buttons were gone you could not do that.
Cheers
That makes sense – but how do I make an instance of a prefab in a scene stop being tied to the prefab at all, and just a standalone set of GameObjects?
I too would love to know. I have a prefab, that I now want to have its children become prefabs rather then the root as many people making changes to a big prefab sucks. Rather would have small prefabs, but I would curse the day someone selected the root still and clicked apply and I lose all my prefab references back to the original single.
Found a work around, posted from another article.
All I did was set up a game object, set up a prefab and dragged the object into the prefab. Then if I break the connection, I get that orange Prefab text on my gameobject. If I then delete the prefab from my project view, the gameobject ‘forgets’ that it once had a life as a prefab.
If you enable plain-text unity files, and open the scene file with your ex-prefab GameObject instance, you’ll find it still has all the ID/file references to the original prefab… I guess that’s not terrible though, so long as the original prefab stays gone.
(I discovered this because mine actually came back to life due to a coworker restoring the original prefab in our code repository.)
Still, good to have a work around!
Gizmmoo, you need to a job at Unity. Steenlund, with all due respect, It is like this “by design” is not an appropriate answer, as it is a disaster waiting to happen.
Case in point:
-You make a prefab.
-You like parts of the prefab, so you break the connection, duplicate it, and alter it to become a different than before. Perhaps including script changes. As this item evolves over time, it may not look anything like the original prefab.
-It sits there happily while you use the original prefab all over the place.
-Life is good until you accidentally hit the extremely skinny apply button on the disconnected piece, and low and behold, you now have a horrible and irreversible change to your entire project. It is a bomb waiting to go off. Better hope you back up often as you should, and if you do, you still have to go through every scene in the entire project replacing the prefab and hooking up links.
Please add a button/option to completely break the thing.
As others have said… this is fine, but we need a button or an option somewhere to TOTALLY remove any prefab stuff if you choose to do that, so that you cant accidentally press it.
What mokkbs described happened to me. Fortunately I had a recent backup to recover the prefab I’d destroyed. I concur with the other posters who have asserted that there needs to be a way to COMPLETELY sever this connection so that the “Apply” button doesn’t inadvertently DESTROY something in a single well-intended click that could potentially be extremely difficult to re-make from scratch.
I found a better workaround for anyone still on 2017:
-
Put your prefabbed content into a parent object
-
Drag that parent object into the project, making a new prefab
-
Break prefab instance
-
Delete the prefab object you just made
This works great, thank you!