Renaming Prefabs

Hi when i try to rename the prefabs in the asset folder, it does not work properly.

I click on the prefab rename in inspector press enter the name changes in inspector but the orignal name does not change in folder?

Thank you in advance

edit . when i save project everything goes back to original name

1 Like

This is expected behaviour. You can rename a prefab by changing it under the Project view, it will then update in the scene and inspector accordingly.

Further reading:
https://forum.unity3d.com/threads/rename-prefab-via-inspector-does-not-change-name-in-project-video.428466/

1 Like

So i should have named it better when creating it. Thanks

I played around with it for a little while before finding the article above. I found that I could create the behaviour you described, but equally I could rename instances of the prefabs which were in the scene, the Inspector would display the renamed instance correctly but in the Project view it remained the same. I could save the scene/project and these didn’t change back.

They make mention of the prefab being a template, and this would kind of make sense, but I agree with you that if you can change some details in the Inspector, it would make sense to be able to rename it also, if that field is available. As per the staff member from Unity who replied in that link above, it may make sense to remove that functionality if it isn’t really intended.

So, yeah… name them better in the first place! :stuck_out_tongue:

Are you guys using Unity 5? I’m able to change the prefab name from the prefab folder in 4.6.9 by selecting it, waiting a second and then left clicking on its name.

1 Like

Hello @Josh_Ray, I am yes, however the behaviour I believe is the same in both major versions.

You can click and rename the prefab within the Assets / Prefabs folder and it will update the Inspector, but @Kevin_Cranfield was describing his process the other way around, e.g. selecting the prefab via the Assets / Prefabs folder and then trying to rename it via the Inspector and that doesn’t work in either - not in the manner you would perhaps expect anyway.

Yes, that’s right, unfortunately, I find that it doesn’t work every time, sometimes you need to select another prefab item and then come back to it to get it to work. I had to google to find out how to change to prefab names. I personally find the method that they use extremely irritating :unamused:.

Ah, ok. Thought maybe you were unable to change the name at all. Thanks guys.

Privacy & Terms