I have more than 200 tags to enter.
In Unity 5, it looks like you have to press + button and enter a tag one by one.
Is there any efficient way to enter many tags?
Yes there is a way, however you have to be careful when editing the asset manually. You have to:
- Go to Edit-> Project Settings → Editor and set the “Asset Serialization Mode” to “Force Text”
- Now open your project folder in the explorer / finder and navigate into the “ProjectSettings” folder. It should be next to your Assets folder.
- Inside that folder your should find a file named"TagManager.asset". You should now create a backup of that file somewhere in case something goes wrong ;).
- Now open the “TagManager.asset” inside a proper text editor. “Notepad++” should do
Right at the top you should see something like:
TagManager:
serializedVersion: 2
tags:
- MyFirstTag
- MySecondTag
layers:
In YAML array elements simply have a minus / dash before the element. So you can simply add more lines after your last tag (in my case “MySecondTag”) and add more elements in the same manner. Make sure you indent your new lines the same as the existing tags. Indention is important in YAML ^^.
Make sure you don’t add any extra empty lines or otherwise messup the structure of the asset. If you do chances are high that Unity is’t able to read the file anymore.
If you’re done simply save your file and you should have your tags when you return to Unity.