- Home /
Lighting layers error
I have recently created a build for the latest version of my game however unity has not allowed me to test the game since the build. It keep s coming up with this error:
Too many layers used to exclude objects from lighting. Up to 4 layers can be used to exclude lights, while your lights use 31: 'TransparentFX' 'Ignore Raycast' 'Unnamed 3' 'Water' 'Unnamed 5' 'Unnamed 6' 'Unnamed 7' 'Unnamed 8' 'Unnamed 9' 'Unnamed 10' 'Unnamed 11' 'Unnamed 12' 'Unnamed 13' 'Unnamed 14' 'Unnamed 15' 'Unnamed 16' 'Unnamed 17' 'Unnamed 18' 'Unnamed 19' 'Unnamed 20' 'Unnamed 21' 'Unnamed 22' 'Unnamed 23' 'Unnamed 24' 'Unnamed 25' 'Unnamed 26' 'Unnamed 27' 'Unnamed 28' 'Unnamed 29' 'Unnamed 30' 'Unnamed 31'
Is there any possible way to fix this? I understand what it is saying however I do not know how to fix it.
The solution should be something like to delete the unwanted lighting exclusion layers. So my real question is how can I delete these layers?
Check your lights and see what layers they are excluding. Your problem is there, not in deleting the layers themselves.
There aren't any abnormalities in the lights' culling layers from what I can see...
I have this same problem. I have disconnected the layers many times, but the Editor seems to keep re-adding them to the lights when I re-load the scene.
Also, the empty layers are null - not connected to any other Game Objects, AFAI$$anonymous$$
This is a similar problem however my lights don't keep adding the layers there are just more layers that are not in the culling masks list that are added by default and there is no way to remove them. I wondered if there was something in unity's options that might allow me to delete unwanted layers...
Answer by jakejolli · Nov 30, 2016 at 11:24 AM
If you have more than 4 layers **Un**Checked in a light's culling mask, you're going to get this warning.
If you need to exclude more than 4 layers from a light, you're going to have to change from deferred lighting.
Your answer
Follow this Question
Related Questions
WindowsPlayer Error when building project 1 Answer
LOTS of build errros 0 Answers
"Error building Player" WebGL build error 2 Answers
WebGL Build Error: IL2CPP error 0 Answers
Gradle build faild. see... error "in unity 2020.1.4f1!!!" 0 Answers