- Home /
Unable to add a tag to a GameObject in Unity 3.4
Problem
I create a cube GameObject with in Unity 3.4 and select it. I go to the Inspector and click the Tag drop down menu and select Add Tag... which is the last option. The Tag Manager opens up and I see the Tags option with a right facing arrow next to it. I click it and the arrow points down now and I see:
Size 1 Element 0
What any of that means I have no idea. All I know is that I can not figure out how to add a custom tag to my cube GameObject or even the Main Camera for that matter. I try left, right and middle button clicking but nothing.
The official Unity documentation is out of date (last update was in 2008). See for your self:
Tags http://unity3d.com/support/documentation/Components/Tags.html
Tag Manager http://unity3d.com/support/documentation/Components/class-TagManager.html
Closing Thoughts
I think it makes logical sense to update all the documentation if you are going to release a software update. Otherwise beginners get screwed. Or did I find a bug?
So is there a way to add a new custom tag to a GameObject in Unity 3.4?
Answer by dibonaj · Aug 09, 2011 at 03:07 PM
Change the size field. Size means size of array. Element 0 is the first element in the array. Simply change the size field to something you would like and you should see more elements added.
To further explain what I mean, just simply click on the 1 to the right of Size. It should highlight and you should be able to put in a value for yourself. If you put in 6 for instance, you will see Element 0 up to Element 5. After that just click to the right of whichever element you would like to change and type in the name of the Tag you would like to create.
Oh thank you very much. Too bad the official Unity docs have not been updated with this valuable information. I will report this. Thanks.
No problem. $$anonymous$$ost, if not all, of the Unity docs are in serious need of updating.
The way the inspector displays arrays and lists - which is what has been confusing you - is far from ideal.
One more thing. If you simply start typing in last empty element listed for the tags, it automatically adds a new element to the array for you.
Your answer
Follow this Question
Related Questions
Ability to add labels to assets in Unity 3.4? 2 Answers
Open the TagManager by code 0 Answers
Find child of a Game Object using tag 4 Answers
Attacking more than one enemy with same tag, but unity only allows one enemy at a time? 2 Answers
OverlapSphere seems to detect everything and ignores tags. How can I fix this? 1 Answer