Default GameObject BitMask: already registered

So, somehow I have managed to get some extra blank layers after my User Layers, resulting in the error:

Default GameObject BitMask:  already registered
Log in file: /Applications/../Runtime/BaseClasses/Tags.cpp at line: 150

I'm using User Layer 8 through 14. Though Unity thinks that User Layer 15 & 16 are also set, despite them having "" as a name. How does one delete or reset these?

EDIT: My suggestion below does not work. Simply deleting TagManager.asset does indeed get rid of the message, but as noted it nukes everything, which is not really viable if you’re midway through a project :|. I’ll keep digging for a solution here.

A less destructive option…

If you set your project’s serialization to text, then you can open TagManager.asset in a text editor and delete the empty entries. You should see a list like…

layers:
  - Default
  - TransparentFX
  - Ignore Raycast
  - 
  - Water
  - UI
  - 
  - 
  - MyLayer1
  - MyLayer2
  - MyLayer3
  - 
  - 
  - 

… delete the empty entires after your layers, noted by “MyLayer*” in the example.

I just ran into the same problem - I think I got this just by tabbing through User Layer #'s without even entering anything into them.

To fix this, I quit Unity and then deleted the TagManager.asset file from the Library folder. When I restarted Unity the errors were gone and I still had my tags in the tag manager and objects were still correctly tagged in the scene. TagManager.asset is also auto recreated in the Library folder.

BUT you should back up your project before trying this just in case you lose any tag or layer assignments.

This thread helped me out a lot, but I noticed that the Layers and corrosponding Physics Matrix will be deleted as well. All objects still work as usual though.

  • All your object layers will still be linked by their registry numbers. Just go in and rename them as they were before. If you linked layers in the Physics Matrix, it will show up again with the correct links as well.

I started my own thread on this before:
Duplicate Registry Error