- Home /
Lights get darker when loading scene
Hi guys ! I have now upgraded from 4 to 5.4.2f2... Disaster ! I had to fix all the loadlevel with the scene management... but i have a problem with the directional light ! If i play the scene from unity it's OK, but if i restart the level, or i start the level from the main menu the direction light becomes more dark and strange... Please help me...
Answer by Zitoox · Oct 29, 2016 at 08:16 PM
Relax, it's pretty simple.
When you select a scene, Unity will automatically bake all the lights and render things. BUT when you open a scene while playing the game in the editor, Unity will NOT bake the lights,render them, fix the effects and all, and this causes everything to stay dark.
This only happens in the editor. If you build your game, you will see that this will not happen. Hope it helped =)
you have right, but when i test the game in my phone, light intensity is good but the shadows disappears...
Check your Quality Settings for the mobile platform.
this is because of the quality settings. Check in player settings and enable shadows in all presets.
You can also bake the lighting yourself for each scene (stops it getting darker upon scene transition). Go to Window -> Lighting -> On the bottom part of the window untick "Auto" and click "Build"
okay. but why? this seems more like a bug than a feature.
I had the same problem, but when i build the game, it still doesn't work :/
Doesn't work... after building my game (at least on linux), loading scenes are also darker...
Answer by Arwym · Apr 03, 2018 at 05:44 PM
For those in the most recent version of Unity as of this date:
You have to go to Window -> Lighting. In that Window, look for the "Debug Settings". Untick the "Auto Generate" checkbox and hit the "Generate Lighting" button beside it. That should take care of it in the editor.
Yes, only for the scene you just loaded via API. I was having this issue when I loaded the scenes like this.
Hmmm, I bumped into the issue that Stencil buffer is not working properly after "Generate Lighting" ...
Hehe, this is funny. I actually had to do the opposite for mine to work. I checked the box that said 'Auto Generate!' That fixed my issue. It created a new Asset in my Project/Scenes named New lighting Settings. It was bright! So I adjusted the light settings brightness, in my directional light in the Hierarchy, via the the Inspector settings. Problem fixed! For me, this issue happened in Unity 2020.3.21f1. While working on Prototype-5, of the Unity Junior Programmer pathway. | P.S. I did this before I spotted this thread. I guess I am learning how to code! I wish I would have found your post sooner, it would have saved me one hour from my 'life span!'
Answer by cycodog · Jun 29, 2021 at 04:18 PM
I HAVE FOUND IT! This is a problem with the skybox loading between scenes. To fix it, go to Window>Rendering>Lighting>Environment. There you should see the Source in the Environment Lighting section set to Skybox by default. When I changed this to color(on ALL scenes) it fixed all my problems with lighting. Every project is different, but this worked better than all of the other solutions I have tried.
This of course gets rid of the missing environment lighting issue, but unfortunately it does so by removing the lighting contribution of the environment. While this might work for some games or some scenes and for averting a complete catastrophe, it's not a solution, it's really just a disabling of the feature, which is not really acceptable on Unity's part.
Unity needs to fix this very basic feature, even if it's only affecting the editor, which there is no guarantee that it is. Environment lighting cannot just be left up to a gradient, not for most modern games.
But it is an option though, and it does at least circumvent this very serious problem for testing purposes.
It will fix it, and it's good. But this will set the lighting for your entire scene. It will make your rooms, caves, and other environments that you might want darker, equally light. This setting affects the entire environment. This problems might need to be fixed in the lighting section, in order to maintain control of the different illumination settings that we want in a scene. But if's a side scrolling runner game, then you're OK. Still, you get props for creativity! --> This setting is for the 'Master Scene.' this means it affects the entire scene. It's used for real time and **Global illumination. | Not telling you this to prove you wrong. But so you know why your entire scene might end up looking brighter or dimmer than you want it in certain locations. But who knows, there are many ways to bypass these settings. You taught me something. I only knew about local illumination before hand!
Answer by triangle4studios · Jun 16, 2021 at 12:10 AM
I just spent 2 hours trying to figure this one out. Come on unity. This is super basic.
This seems to happen when the load scene has a different lighting setup than the second scene. It also seems to be that the scene you are in when you build, is NOT the scene that gets lighting set.
I dont know how else to explain it.
I have a menu. I have levels. The menu is the first scene and has no light. when I build from the menu, all is well. When I build from any other scene, the build has darkened lighting.
This is a very weird and confusing issue that needs resolution.
Answer by jubaerjams8548 · Jun 09, 2020 at 01:15 PM
before baking auto lightning,
but after baking ,the light get dark, ineed solution please....it hurts
Your answer

Follow this Question
Related Questions
trigger spot light to turn on 3 Answers
How to get the lights positions from within a shader? 0 Answers
Check if an object has a light shining on it 1 Answer
dim light as actor moves away 1 Answer
Problem with Light 0 Answers