Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.

What is the maximum number of tags you can use in the inspector now?

Discussion in 'Unity 5 Pre-order Beta' started by Velo222, Feb 28, 2015.

  1. Velo222

    Velo222

    Joined:
    Apr 29, 2012
    Posts:
    1,437
    Hi,

    I am using a few tags, but was just wondering if there was a maximum amount of tags one can have in the inspector (the normal tags system)? Doing a short google search someone said 10,001 is the maximum number of tags you can use. If this is the case, that's great! I just wanted to check though, to see if it has changed or not.

    I'm also using Unity 5 beta right now, so I'm not sure if the maximum number of tags has changed in Unity 5 either?

    Thanks for any info.
     
    wlwl2 likes this.
  2. Eric5h5

    Eric5h5

    Volunteer Moderator Moderator

    Joined:
    Jul 19, 2006
    Posts:
    32,401
    Go to the tags & layers manager, set the size of the tags array to some number, and see what happens.

    --Eric
     
  3. Velo222

    Velo222

    Joined:
    Apr 29, 2012
    Posts:
    1,437
    Hi Eric,

    I don't see a way to set the number of tags? There is an "Add to List" button to add another tag, but I'm not seeing an input field to specify a number.
     
  4. Eric5h5

    Eric5h5

    Volunteer Moderator Moderator

    Joined:
    Jul 19, 2006
    Posts:
    32,401
    Oh, right, they changed that in Unity 5. Well, I guess keep clicking the "+" button until you can't anymore. ;)

    --Eric
     
  5. Velo222

    Velo222

    Joined:
    Apr 29, 2012
    Posts:
    1,437
    lol, ok ya, I was confused. I was gonna show you a picture of it haha.

    Well, I'm not THAT curious to know if it can go up to 10,000+ lol. Thanks anyways though Eric :) I'm just gonna assume it can go above 200 or so, and I'd be okay with that. I doubt I'm going to use over say 500 max........but I guess you never know.
     
  6. jashan

    jashan

    Joined:
    Mar 9, 2007
    Posts:
    3,306
    I'm pretty sure you can have any number of tags as they end up only being a string stored with the game object. Layers are different, there you have a limit because they end up being bits ;-)
     
  7. Eric5h5

    Eric5h5

    Volunteer Moderator Moderator

    Joined:
    Jul 19, 2006
    Posts:
    32,401
    At least in Unity 4, there is for sure a 10,001 limit, which you can test by simply setting the size of the array to anything more than 10,001. It's clearly an arbitrary limit (10,001? Wut?), but the inspector gets quite laggy with that amount. But then, if you need that many, you're abusing the concept of tags and should have a re-think. ;)

    --Eric
     
    Content1of_akind likes this.