Hi, I am confused about static batching. I read that it can boost performance but it can cost memory. Not sure if I should do static batching or not. I read the documents but it’s doesn’t give a lot of examples.
So…I should mark my non-moving objects with the same materials as Static? Or should I just mark all my non-moving objects as Static? What’s the correct/ right way??
Unless you are running out of memory when running your game , mark all non moving objects as batching static.
It will reduce draw-calls if it makes sense.
It does, but you’re also not rendering that object then. A “draw call” means, more or less, that there’s a visible object on the screen that needs to be rendered, which has some CPU costs.
Static batching (for non-moving objects), dynamic batching (also works for moving objects), instancing (for rendering many instances of the same object) or combining meshes that use the same material reduce the draw calls.
Static batching has some memory costs, dynamic batching has some CPU costs, combining meshes is not always very practical. Instancing is generally a good idea I think (might have some downside too in some specific situation).
I already tried that, turning off auto and under ‘Build’, I select ‘Clear baked data’ but nothing happen. There’s a indication of no lightmap and some objects are still black with darken lighting.
Just for clarification. Just Checkting static set “All” Static flags.
If you just need Batching , you just select the small drop down on the right of the static checkbox and select “Batching Static”.
Managed to revert back by unticking all the options in Lighting>Scene and click build. The funniest thing is that Unity indicate that there’s no lightmap when my lighting is screwed up because of it.