Where are my layers?
Asked Answered
V

2

0

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?

Vinia answered 10/11, 2023 at 9:50 Comment(0)
B
0

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.

Bucket answered 10/11, 2023 at 9:52 Comment(0)
R
0

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.

Ruthful answered 10/11, 2023 at 7:59 Comment(1)

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

© 2022 - 2024 — McMap. All rights reserved.