I’m making a very simple game. Basically after the play misses three object, the game will reload the scene he was just on.
So i would use
Application.LoadLevel(“_Scene_00”);
However, for some reason whenever the game reloads _Scene_00, the lighting darkens dramatically.
I’m using a directional light, and even after the scene change it is still in the same spot.
I’m having the same problem, it seems to be something to do with the global illumination, I have not found a fix, however the problem doesn’t seem to impact the build, just playing in the editor.
Trying building and running that, hopefully the editor will be fixed in a future patch or something.
In both of your scenes go to Window → Lighting → Lightmaps and disable auto and manually click Bake. Leave the auto checkbox off. Do this for both of your scenes, the start menu scene and your game scene. In both scenes the auto checkbox must be off and have a lightmap snapshot up above in the lightmap snapshot field.
In Unity 5.2.0f3, if you call DynamicGI.UpdateEnvironment() after scene has loaded in the editor, this will fix some of the missing GI.
I have implemented this workaround in a persistent (DontDestoyOnLoad) MonoBehaviour:
I found out that sometimes when baking, the references mess up.
I have a MenuScene that has no lighting and a GameplayScene with all the stuff setup. After baking the GameplayScene, I noticed it gets darker when loading from MenuScene. After some playing around, I went to MenuScene >> Lighting >> “Clear Baked Data” and to my surprise, I saw the contents of GameplayScene lighting folder delete (?!?). I baked again and since then it’s been ok.
So, basically, open the scene from where you call Application.LoadLevel() and clear its baked data. Observe whether it deletes lighting files from your level scene’s folder. If that’s the case, hope this helps you.
I’m having the same issue, I’ve come upon this after submitting a similar question.
After further inspection, I’ve found out that the shader of the (only) mesh I have in the scene is changing after level restart. The parameters are the same (it’s a standard shader), but the preview in the inspector is black instead of white.
I’d suggest you to check the shader before and after level restart, it might be an issue with Unity 5.
I am working on a procedurally generated platformer, and I had strange lighting issues. Baking the lighting didn’t work (for obvious reasons) but I found that going to the inspector panel of the light and changing Baking to “Realtime” instead of “Baked” worked for me. Hope this helps.