Does Unity know tags can be renamed in Debug view mode?

The manual says tags can no longer be renamed

But when viewing the tags in the inspector and switching to Debug view, it is still possible to re-name the tag and save the project.

Are they aware of this?

That’s why it is named “debug”.
Its for bypassing safeguards.
Of course they are aware of it :slight_smile:

Just because you can doesn’t mean you should. Debug mode is for when you know exactly what you are doing and are working to fix some problem.

I’ve tried it and indeed, it’s good for “last minute fix” but not robust changes.

If you rename a tag this way, objects with said tag will appear with the new tag name but internally they won’t have the new name (check out the scene/prefab asset in serialized text mode in a VCS diff and you’ll see no change). This is just a transient state where the editor remembers tag by index somewhat. If you open another scene or restart the editor, it will recreate a new tag with the old name just for objects that used the now renamed tag, and no objects will actually be using the new tag name. So that’s just for quick testing and you must absolutely set tags on all concerned objects manually to another tag then back to the renamed tag if you want to update all tags accordingly (and if there are multiple scenes with such objects, that becomes very difficult without automated scripting).

It’s probably not better than just adding a new tag and removing the old one after finishing the tag transfer (which has the advantage of warning you if objects are still using the tag; well, at least in the open scene), unless you really want to preserve your tag order and are, say, just fixing a typo or something.

1 Like