- Home /
Light gets darker after loading another scene
I followed a tutorial and created this box with a ball you can move around in Unity 2017.3.1f1:
https://i.imgur.com/rqyNY6s.png
After loading my e.g. options menu scene ("SceneManager.LoadScene("OptionsMenu")"), which also unloads the main game scene, and closing it again, it looks like this:
https://i.imgur.com/rwvrJNq.png
If I load the options menu first and switch to the game scene afterwards, it directly loads with the weird lighting.
I've never changed anything about the lighting in any of my scenes and already tried doing the following in every scene but it didn't help:
Window - Lighting - Setting - Uncheck "Auto Generate"
Select "Clear Baked Data" in the "Generate Lighting" list
Click "Generate Lighting"
Does anyone know what could be the problem and how to fix it? Thanks in advance!
Answer by SkyAngel_AOG · Apr 11, 2018 at 08:39 AM
HI, @SimRuJ!
click to dirrectional light object, in inspector set Light Mode to Realtime. the next open Window -> Lighting. In lighting window click to Generate light in your scene.
Thanks for the tip but all of my lights (1 light per scene that was automatically added) are already set to "Realtime", it's probably the default setting.
I already tried to generate the lights again and also cleared the "Baked Data" - that's what was usually suggested in similar threads - but it didn't help.
The thing is: The game view previews the the right lighting for the scene with the box, it's only when I start my game (through the "play" button or the built exe file) and switch to the scene from the main menu that the lightning is messed up.
Another post mentioned that the problem might be caused by using "DontDestroyOnLoad", which I did try at one point but it didn't work, so I deleted the code for it again.
I have the same issue. Did you find a solution for this?
Sorry, haven't worked on that project in a while. I'm currently using Unity 2020 and also haven't really checked lately if the problem's still there (at least with two scenes). One thing I can tell you is that objects/lights (with real-time lighting) don't like being white in Unity 2020, you have to change the settings a lot and then it feels like the light's too bright. There's at least one tutorial on youtube about how to get actual white lighting but I haven't fully watched it yet.
Answer by Bartson · Apr 11, 2018 at 06:30 AM
It's normal thing. Just do build and everything should be ok.
I built it (standard build settings, Win 10) and even started it directly through the .exe file but it's still doing it. :/
So I can't test scene changes in my game with correct lighting in editor (without doing a full build of the game)? Seems... bad?
Your answer
Follow this Question
Related Questions
White objects are grey with no light 1 Answer
Help with scene lighting 0 Answers
Lighting only happening when the player get close. 4 Answers
how to seperate two visually distinct game modes 1 Answer
Toggle built in lighting in script 1 Answer