Unity 5 SkyBox Ambient Lighting Problems (after Loading Level)
Same problem as in this thread, which remained unanswered: http://answers.unity3d.com/questions/922885/unity-5-skybox-lighting-bug.html
After reloading the active scene like this:
int sceneIndex = SceneManager.GetActiveScene().buildIndex;
SceneManager.LoadScene(sceneIndex);
all my objects turn black. The skybox ambient light wont work anymore, although I tried to change the Lighting settings during playing (Color and Gradient ambient lighting still work).
I reloaded the exact same scene.
This bug occurs in the UnityEditor only. When built, the level loads perfectly.
Answer by ZorbaTHut · Jan 08, 2017 at 06:33 PM
This appears to be the result of a Unity bug caused by loading a scene during a specific event (one report says that this occurs when loading in Awake(); I haven't tested it.) There's a pretty simple workaround; call DynamicGI.UpdateEnvironment();
explicitly. It'll tell Unity to update lighting settings.
Probably want to do this exactly once, right before the load screen goes away.
Your answer
![](https://koobas.hobune.stream/wayback/20220612055716im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
DisplayDialog can only be called from the main thread 0 Answers
camera movement in game scane,camera movement inside game scene not working 0 Answers
can I Cutoff/Blackscreen part of the unity camera screen? 0 Answers
Unity Ads not showing in editor (dummy ad placement is not showing too) as well as in the build. 2 Answers
How can I edit materials on the model I brought from Sketch-up?,Hi, 1 Answer