You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Would be nice to see after changing the name of a Prefab in the project view, to then change the names of all gameobjects using that prefab in the scene.
Thanks for the suggestion - This is a nice script!
So the workflow you are needing to do right now is:
Rename a prefab
Select the objects in the scene with the old name and
Revert them with menu item: Prefab/RevertName
I like the idea, but there are a few potential problems. Not sure if they are dealbreakers or not.
Within Unity I don't believe it's possible to distinguish whether or not an instantiated prefab in the scene had its named changed from the prefab. So if someone deliberately changed the name, we can't tell. We also can't know if the user wants these renamed or not.
Even if we could tell, maybe they've enumerated multiple instances with a suffix, such as Char_Hero (1). Should it change the common substring?
These prefabs could be used in any scene. So just looking at the open scene isn't enough.
In these cases, I think I'd expect a user to fix them with the bulk renamer themselves. Simply because we can't know what the "right" way is to fix up the users assets. Here's an example: if you want to change Char_Hero to Batman in the project and the scene, I'd probably search my scene for "Char_Hero", and my project for "t:prefab Char_Hero", and just drag everything in and Replace "Char_Hero" with "Batman".
That said, I this gave me an idea for a feature that might allow this.
Custom script nodes - users could create functions that adhere to some signature and do anything, and you could put them in the rename pipeline on the left. In this case you don't need all that, you'd just need a callback when it's done. Which might be the way to go.
So I think I'd like to keep this Issue open until I have a chance to write up a design for Custom Script operations. But ultimately I'd probably close it in favor of custom scripts - and maybe ship with a few operations, including this one.
Would be nice to see after changing the name of a Prefab in the project view, to then change the names of all gameobjects using that prefab in the scene.
Something like this:
https://pastebin.com/DaiACbJU
The text was updated successfully, but these errors were encountered: