I am trying to develop a tool for light baking with certain modifications, but I do not understand the difference between the two functions BakeAsync and BakeMultipleScenes.
What is the difference between them if I have one scene or two scenes?
Part of the code that I am using:
private void OnBakeDynamicLightingButtonClicked(ClickEvent evt) { if (SceneManager.sceneCount > 1) { int sceneCount = SceneManager.sceneCount; string[] scenePaths = new string[sceneCount]; for (int i = 0; i < sceneCount; i++) { Scene scene = SceneManager.GetSceneAt(i); if (scene.isLoaded) { scenePaths[i] = scene.path; } } Lightmapping.BakeMultipleScenes(scenePaths); } else { Lightmapping.BakeAsync(); } }