When loading and playing some demos i have noticed it created some tag names i didnt create(in the tag list). How is that done? I guess what i want to do is create them in script. Then the next time i add a prefab to another project that needs lots of tags it will create them for me.
I think tags are just strings, so just set the string dynamically in code. Perhaps they are then remembered in the tag list?
(not tested)
myGameObject.tag = "myNewTag";
I change tags all the time in run time But if it is’nt allready defined(in tag editor) it will give me an error. I know there must be a way cause after a few demos they left tags behind i did’nt define lol. So im also trying to figure out how to take them out by code as well. Guess im just lazy lol.
I seem to remember in a recent thread someone saying that tags could only be added via the editor, and not via code. (Don’t have a link to the thread though…)
thats correct, the tags are defined in the editor, you can’t create new ones on the fly and alike.
they are “editor driven categorization”
I noticed mystery tags as well.
In my case it’s old tag names appearing in a new position. I figured it is being caused by an old object hiding in my scenes and when it finds it’s tag isn’t there it re-creates it in a new spot.