I have a little problem with my main menu in Unity.
If I press the "Play" Button, it starts the game how I want it to.
The problem is, that my scene "Lights" are not completely loaded. (I have a lot of effects in it). So the scene is loaded, but everything is dark, completely without the lights:
I tried it with asynchronous "LoadSceneAsync", like so:
public void LoadByIndex(int sceneIndex) {
StartCoroutine(LoadNewScene(sceneIndex));
}
IEnumerator LoadNewScene(int sceneNumber) {
AsyncOperation async = SceneManager.LoadSceneAsync(sceneNumber);
while (!async.isDone) {
Debug.Log("hello");
yield return 0;
}
}
Ok i got it.
The problem was the Auto-Light-Baking.
Just go to Window > Lighting > Settings > Scene
And then scroll to the bottom and uncheck the "Auto Generate" for "Generate Lighting"