So I was wondering how I can restore my layers and prefabs. Earlier this morning my prefabs weren’t letting me drag them onto a scene. So I went into where I had saved them and renamed them, then unity reloaded the prefab normally and I could use them! Now, the problem is, my layers are missing, so my enemy characters don’t know what a solid object is…etc So where is my layers file located? How can I force unity to reload it?
Where are my layers?
Asked Answered
Layers are stored in a file called “TagManager.asset” in your ProjectSettings folder. If your restart Unity it will load that file, but if it somehow got deleted, your layers are gone and will have to be recreated.
I have checked the “TagManager.asset” and there are only the default layers.
But all the layers I have created are working properly, even if they are not present in the inspector and in the file.
I have an empty slot in the layer dropdown.
© 2022 - 2024 — McMap. All rights reserved.
That is correct. The layers in the TagManager are just labels for the layers. The actual layer is just a number between 0 and 31 which is stored in the gameobject itself. There are only 32 layers since they are bound / mapped to the 32 bits of an integer when we talk about layer masks.
– Secure