Marking object as 'static' increase lag!

Hi guys,
i’m making a racing game which has a little open city. Yesterday I tried to mark all the buildings as “static”. After 20-30 minutes of baking process, I tried the game and it was extremely lagging! Today I waited for the global illumination process to finish (it tooks 10 minutes) but again, the fps drops from 60 to 10-15. And every time I build the game, the global illumination background process starts again (why even If I didn’t change anything?).
So, If I leave the object as non static the game is smooth…I thought that marking them as static should have increased the performance. Do I miss something?

Have you tried profiling your game in order to pinpoint the issue? Baked GI should not affect the runtime performance at all.

I tried but I didn’t understand too much. I need to check how to see all the values and variables/ui elements used during each frame. But apart from that, I think it’s strange that making my buildings statics (they are about 100-120 buildings) the game lag, while withouth the static mode it’s smooth at 60 fps or more.

Can you post a screenshot of the lighting window?

Sure!
That’s my settings for the lights:

6753493--779086--upload_2021-1-22_18-9-53.png6753493--779089--upload_2021-1-22_18-10-0.png

Is it normal that every time I build the project, even with no change, the global illumination task starts? This happens only when I have the statics buildings

Uncheck Auto Generate, and generate lighting manually instead.

Ok, I’ll try. What’s the difference by generating lights manually? And when do I need to generate again all the lights?

The only difference is convenience. Auto Generate is handy when you are iterating on lighting (constantly moving, adding lights, etc.) as it bakes lighting as soon as there are changes.
Baking lighting manually will not affect the output. The only difference being that you will have to click Generate Lighting button yourself, that’s all.

1 Like

Oh, that’s why every time I build the project I have to wait 20 minutes. Thank you!