I ran into an issue when I created a very basic 3D scene in a new Unity project; I noticed that when I used Application.LoadLevel() to reset the scene it would cause the lighting to change drastically on the second load.
This has to do with the lightmap that Unity pre-generates or “bakes” ahead of time. A lightmap is a stored list of positions for light and shadows to increase lighting efficiency. The issue stems from Unity generating the lightmap once and it is reset when the scene changes.
This only happens in the preview window in the editor, so don’t worry it won’t happen in your builds.
You can fix this in the Editor, go to
Window - Lighting - Settings - uncheck the box for “Auto Generate” near the bottom of the window
Note: if you make any changes to you lights or add more lights, you need to ‘bake’ the lightmap again. To do this come back to theWindow - Lighting - Settings and press "Generate Lighting” to bake the lighting once manually.
New Unity tips every week!
Help keep the series alive, become a supporter on Patreon! [ Ссылка ]
Download Unity here: [ Ссылка ]
![](https://i.ytimg.com/vi/F-aUMLdIxRY/maxresdefault.jpg)