What's the purpose of the empty builtin layers?

It actually JUST dawned on me the other day that I can only have 32 layers, which sucks because I’ve been using them like crazy now that I know how to use the physics collision matrix. So now I’m trying to combine my layers where possible to make room, and the empty spaces marked “Builtin layer” are starting to take a toll on my sanity.

Why are they there? I understand there’s meaning to the other ones like Water, IgnoreRaycast, etc, but what about the 3 empty ones? Is there a reason I can’t use those?

As you say, there’s a hard limit of 32 layers because of the way Unity’s physics handles layermasks.

The “blank” layers are reserved for future use by Unity, in case they develop features that require any extra layers.

I haven’t tried using any of them. I have a few things you might try, but all of them are distinctly in the “void your warranty” category, so probably wouldn’t recommend them for best practices:

  • If you directly edit the layer names in TagManager.asset, do they show up in the editor?
  • Do those renamed layers then show up in the physics collision matrix, and/or could you edit DynamicsManager.asset to set their properties?
  • If you can’t name those layers, can you use a script to assign them numerically?

Seems to work, you can use them they just don’t show up in the inspector.

They can be set using

Physics2D.IgnoreLayerCollision()