Why does the light disappear when compiling into WebGL?
I have this projecto of a building and when I bild it into a PC format, the lights are on and you can see everything without problem. Here there is a snapshot of the scene:
Then, when using Unity to build this same project into WebGL platform, suddenly all the lights of the project disappear and the scene is dark, as you can see in the second picture.
Does anyone know why this happened? I tried fixing it by adjusting the directional light but it didn't seem to work in the WebGL version.
maybe the performance of the scene in webgl is too bad and unity tries to compensate by disabling some realtime light sources. you can flag the render mode of light components as "important" in the inspector to avoid this to some degree. you might also bake the light in this scene to reduce the performance cost of realtime lighting.
Hi, I already tried to put the light components to "important" but it stayed the same. I am trying to put lots of 'point lights' around the building but I am not sure if there could be another or faster way to do it.