- Home /
LoadSceneAsync breaks lighting with Assertion failed (Update: Light probes are to blame!)
I have a scene and on the first frame I load several other scenes additively. Everything works. However, if I wait a few moments, then load one of those scenes additively, my lighting breaks and my console is flooded with the following assertion
Assertion failed: Assertion failed on expression: 'root1 >= -epsilon || root2 >= -epsilon || root3 >= -epsilon'
At first I thought it may have something to do with light probes because the lighting errors only appeared to be on the moving elements. However, after removing all the light probes, I'm still getting the error.
My assumption is that loading the scenes in the first frame causes the original scene's lighting to override that of those additively loaded and that loading a little bit later causes some kind of conflict.
Any ideas on what could be wrong or how to get around it?
Update: My hypothesis has changed. The assertion is stemming from the loading of two specific scenes in a specific order and the assertion is being thrown by a few different meshes.
Lets say I have scene A and B. If I load A on Start, wait five seconds, then load B a few meshes in A will start throwing the assertion (at least I assume they are because if I disable them, it stops). The assertion is ONLY thrown in the above instance. If the scenes are loaded in a different order, or loaded in the same order but both at Start, there will be no assertions thrown.
Update: The assertion disappears if I disable certain static objects in scene A. This is baffling. There is nothing in the setting differentiating them from objects that are fine.
Update: I deleted the entire lighting folder and rebaked. The error is gone. I deleted the entire folder again, put the light probes back in, and baked again. The error returns. The error has something to do with the light probes. Even though I deleted them before, I guess there was something in the lighting folder that was acting like they were still there. It appears that the assertion is caused by some kind of triangulation error when sets of probes are loaded very far apart but only when they are loaded very far apart with a time gap between the loading, and only when they are loaded in a specific order.
The assertion stems from static objects. Why do they care about light probes at runtime?
Note: Unity 2017.3.1
Your answer
Follow this Question
Related Questions
Additive scenes with scene-specific global light settings 0 Answers
How to wait for baked lighting to load when using LoadSceneAsync? 0 Answers
Modify Scene origin before loading scene? Or LoadLevelAdditive @ certain world position 0 Answers
Generate Lightmap UVs causing needless overlap 0 Answers
What does (not loaded) mean? 0 Answers