- Home /
Dynamic Batching not working.
Hello, I am developing an endless games, it has some coins and other enemies type stuff, I am instantiating the enemies and coins through a prefab but they won't dynamically batch together. Do I have to assign them material through script or just drag drop the material to the object would still dynamically batch ?
Have you read the manual? There are a lot of factors contributing to why it wouldn't be batched. The main one being the amount of vertices of your mesh and the material (shader) used. (read the part about dynamic batching)
Another reason could be using a renderer that doesn't support batching...
Currently, only $$anonymous$$esh Renderers are batched. This means that skinned meshes, cloth, trail renderers and other types of rendering components are not batched.
And for the second part, assigning them in the ispector should not break dynamic batching. setting a Renderers $$anonymous$$aterial will break batching. Setting a Renderers shared$$anonymous$$aterial won't break batching.
If this manual doesn't help you, then adding information about the mesh and shader you use might enable someone to give a better answer to this question ;)
I had the same issue. So i just counted myself how many batches should have been there and found out, that there was actually less batches, than I thought. So I came to the conclusion, that "Batches" shows the total amount (with saved batches) and "Saved by batching" is broken and always says 0. Also this could be utter nonsense what I wrote :P