It only happens in my main game project. I've tested it in 2 other empty projects, both in multiple versions of unity (2018.3.0f2 and 2018.3.2f1).

The strange thing is that if I look at the material, it has the correct material in it (same as what I assigned before building the assetbundle), but if I manually go through the shader menu, and click on the exact same shader again, the lighting is fixed.

These are the settings I was using in the screenshot below:

  • Default skybox
  • Sun rotated directly down and 0 intensity
  • Ambient mode set to color
  • Ambient color #111
  • No post processing
  • Model was imported from an asset bundle and spawned at runtime
  • All lighting is dynamic

Heres some screenshots: https://imgur.com/a/yV0wE0d

I just want to reinforce the fact that the only difference between the two images is that I reassigned the exact same shader to the material.


(a workaround was suggested here but the underlying problem still persists: https://www.reddit.com/r/Unity3D/comments/ah39jm/prefabs_imported_from_asset_bundle_are_not/)

  • \$\begingroup\$ Yup. I've seen it too. I wish I knew why is it happening. My guess was that the ambient lighting is using the precalculated lighting maps, and so it has to be updated when you copy a prefab. I did some tests and hasn't proven this guess, but I wasn't trying hard enough. In my case the problem could be easily solved by adding a directional light, and so I did. \$\endgroup\$ – real4x Jan 18 at 7:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.