When we copy the content of scene#2 into scene#1 manually, it works - but when using the function above it seems like the realtime GI does not follow scene#2 into scene#1 (looks like it has no realtime GI).
Any input and help on this issue is greatly appriciated.
I’ve been following this issue quite closely.
Unfortunately this has been on ongoing issue with 5.x. There’s quite a few threads on the forum about it.
As far as I understand it and through my own testing the outstanding issues are with build players. Standalone and Mobile.
When a scene loaded with LoadSceneMode.Additive and then activated with SceneManager.SetActiveScene() the GI is not rendered correctly. Depending on your lighting settings the result is usually a completed washed out scene.
An example can be seen on this thread:
Unfortunately Unity devs aren’t very forth coming so we’re in the dark on this one.
There’s a “Fixed” issue #659042 on the tracker but as the comments on it suggest, it’s only fixed in the Editor.
Hey @olavrv ,
Could you specify if you’re doing that in the Editor or in the player? If in the Editor, is ‘Auto’ enabled in the lighting panel in the scene that you’re loading additively?
If that’s the case then currently realtime GI for the scene that is loaded additively will be missing.* We’ll be fixing that soon.
Workaround: disable ‘Auto’ in the scene that you want to load and build the lighting for it manually.
Cheers!
*) Some background on why that is:
when in the ‘Auto’ mode Unity continuously looks at the contents of the scene and makes sure that lighting is up to date. The results are only stored in the cache and when that scene is loaded Unity spawns jobs to generate the needed data and quickly notices that this data is already in the cache, loads that and patches the scene with results.
However, when one enters the play mode in another scene and tries to load the first scene additively, that process will not run and the scene that is loaded will not be patched with appropriate data.
The fix is not to run that process when in play mode though. Instead we’ll always create the lighting data asset (so the same thing that is written to the Assets folder when ‘Auto’ is off) and will store that in the cache. That will allow scenes that use ‘Auto’ to get lighting instantly when they’re loaded, regardless if they’re open by double clicking the name or loading the scene additively in play mode.