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.
What am I looking for in my light's layers?
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, AFAIK
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...
Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.
The best place to ask and answer questions about development with Unity.
To help users navigate the site we have posted a user guide.
If you are a new user, check out our FAQ for more information.
If you are a moderator, see our Moderator Guidelines page.
We are making improvements to UA, see the list of changes.
For troubleshooting common problems with Unity 5.x Editor (including Win 10).
Answers and Comments
19 People are following this question.
Error: System.IO.FileLoadException: Mixed mode assembly is built against version 'v2.0.50727' of the runtime and cannot be loaded in the 4.0 runtime without additional configuration information.
How come I can't move in the built version of my game?
"Error building Player" WebGL build error
BCE0019: 'ButtonAction' is not a member of 'UnityEngine.Component'.
Errors when made a build and stored it in the assets folder.