We’re in the process of converting a project to use asset bundles and we’re having issues with building scenes that contain no lighting, such as additively loaded scenes that only contain logic.
The build halts shortly after the following error message:
GfxDevice renderer is null. Unity cannot update the Ambient Probe and Reflection Probes that the SkyManager generates. Run the Editor without the -nographics argument or generate lighting for your scene.
Naturally, since the scene has no lights or geometry, it does not have generated lighting information. We’re running the builds using the -nographics flag since it’s a CI build on a cloud instance with no GPU.
I’ve never encountered this issue in the past, with multiple projects that use asset bundles, so it seems like a new behaviour.
Initially, I thought this might be caused by the “Recalculate Environment Lighting” flag under “Workflow Settings” in the Lighting window, but toggling that off had no effect.
I don’t see why Unity needs to update probes during the build process for these scenes which have no lights or geometry in them. Especially considering the fact that it doesn’t happen when you include the scene in the player build instead.
We could of course do what the error says, but there’s problems with that:
- We can’t disable the -nographics flag since the build runs on a cloud instance with no GPU.
- We can generate lighting for all our scenes, but then builds will just fail again as soon as someone adds a new scene without lighting. Until someone remembers that you have to bake lighting even though there’s no lights to bake.
I think this is a bug but I’m not sure, maybe this is how it’s intended to work now. That’s why I’m asking here.
Is there any way to disable this light probe update?