Addressable Scene with real time light is dark after loading, but only sometimes

Hello,

  • I have two projects (same settings) one for asset export and one for the actual game
  • I build a addressable bundle in one and then (manually) load the bundle catalog from a specific directory
  • I then load a additive scene from the bundle (with the addressable methods, not the normal SceneManager)
  • Then I set the loaded scene to the “main” scene, so that the scene / light settings of the new scene are used
  • Weird thing: Sometimes the scene looks correct, but sometimes it looks dark
  • The behavior only changes after the bundle is built again, so if the same bundle is used during multiple play tests, then it will always look the same, but if I build a new bundle (with the same settings) then there is a chance that the new bundle will suddenly contain the “dark” scene

I have a simple scene with one real time directional light (no other lights) which is set to real time and the light settings of the scene are also set to real time. The scene looks correct in the asset project during play mode, the “dark bug” only happens after the bundle was built and loaded from the other project and only sometimes, there is like a 50% chance that the scenes looks either correct or dark.

I found many (old) threads about “dark scene” issues but all of them are about mixed / bake light where people forgot to bake or the baking wasn’t done yet. I did not bake any scene light because I only have a real time light and assumed that baking is not required with real time light or am I wrong with this assumption?

But that also wouldn’t explain why it works in some cases and doesn’t work in the next bundle build with the same settings, because the auto bake setting is off and I never pressed the manual bake button, but it still looks correct in some cases.

Hi @R1PFake are you using shader stripping in graphics settings? Unity strips light-map shaders that are not used in scenes, for example shaders that are only used by addressable assets. More info here: How Addressables interact with other project assets | Addressables | 1.20.5

1 Like

Thanks! This did the trick for me.