- Home /
Why my build didn't include lighting?
I am making a 2d game. In my game i had a 2d global light and many free form lights in a scene. When i played it in the editor or game view it worked perfectly but when i built it out it wouldn't have any lights. I was searching but didn't find any thing that work. I tried to remove all the game qualities except for ultra and it still wouldn't work. Why? How do i fix it? (i am currently using Unity 2019.3.12f1)
Ps: I exported to windows 64bit
Answer by Long2904 · Jun 23, 2020 at 06:11 AM
Okay i found out what went wrong. It was because there was a part of my script that would reset the material from "Sprites-lit-default" to "Sprites-default" when build the project.
I'm having the same problem you were... what part of your code ending up changing / reseting the default material when building?
It was just some custom library that I was using. I don't think it was anything related to Unity, just my bad.
Your answer
![](https://koobas.hobune.stream/wayback/20220613000057im_/https://answers.unity.com/themes/thub/images/avi.jpg)