|
I'm setting a script to initialize common stuff I usually add to a new project, and one of those are some custom tags. Is it possible at all to create a tag programmatically?
(comments are locked)
|
|
I don't think it's possible.. If you look it up in the Unity Script Reference you will find: "Tags must be declared in the tag manager before using them". EDIT: You can actually assign tags to objects if you have already declared them in the tag manager. Example:
This will work if you've made a tag called "Player" in the tag manager. The tag manager can be found by going to Edit -> Project Settings -> Tags Ok, that's it then. A pity because I'm much more a code guy than a GUI guy. I wish I could do everything in code. Thank you.
Nov 11 '10 at 07:53 AM
Rodrigo Moraes
Oh, I know about assigning existing tags. The question was about creating custom tags programmatically, though. I wanted to do this in a "setup project" kind of script.
Nov 11 '10 at 09:53 AM
Rodrigo Moraes
Have you tried looking up the classes in the UnityEditor namespace? It's possible that you find something there.
Nov 29 '10 at 07:38 AM
xeophin
As of Unity 3.1.0f4 there are no features in the scripting reference that I can find that would do this (create a layer/tag programatically). It would definitely be a handy tool to have.
Dec 10 '10 at 12:00 AM
Steven Walker
I second this. I want to use about 560 different tags and I'm dreading the task of creating them manually.
Jan 21 '11 at 03:26 PM
novo
(comments are locked)
|
