Restore prefab's name?

If a prefab instance in the scene is renamed, either by the user or automatically by duplicating the prefab in the scene, the name connection to the original prefab is automatically broken beyond repair, right clicking the name doesn’t show a “Revert value to prefab” option, this makes it impossible to keep the original name since duplicating a prefab is the fastest way to work, now i want to rename some prefabs but renaming the master prefab won’t change most of the prefabs in my scenes, I’d have to rename a thousands prefabs individually one by one if I ever wanted to change the prefab’s name, is there no way to reset all instances to the original prefab name?

In short:

I want to rename all the prefab instances in my project by renaming the original prefab, which doesn’t work on duplicated (or renamed) prefabs in the scene. I’d like to either prevent, or fix the broken name link.

If you want to revert the names of prefab instances to the name of the prefab itself you can use this little tool i just created: PrefabNameRevert.

Just select one or more prefab instances and select “RevertName” in the “Prefab” menu.

Note that i removed my original script and replaced it with a much more simpler one.

I wonder why the Editor doesn’t let you do this through the Inspector. Every other game object property (that I am aware of) can be considered an “override” and inherits from the prefab and can be reverted. And you are allowed to name two or more objects in the scene at the same level of hierarchy the same thing…

Is the problem that users are more likely to want uniquely named objects, so doing “Apply All” on a prefab instance could ruin the naming in a whole scene? If that is the reason, it would be nice to have an option to “lock or unlock” certain properties for Overriding and Reversion.

Hi @KhenaB,

Not sure why you want to rename the prefabs, but if it has to do with searchign for the prefab name in game you can use this:

void Start () {
 this.gameObject.name ="SetTheNameHere";
}

Alternatively I found that selecting all the objects in the hieracrchy, right-clicking and say rename changes them all.

You can change inspector to Debug view and there you can revert insance name.