- Home /
why wont Static mesh always batch with same material?
I've been creating assets in Maya to build complex prefabs in Unity 3D. I use the static flag to batch all of them, but for some reason, depending on the amount of prefabs in my scene, the items wont batch in the same way. I tried taking away the complexity of my prefabs by manually batching meshed by material in Maya. It reduced some of the draw calls but it still doesn't do a difference once several prefabs are in the same scene.
I only have 3 different materials (one uses cutout alpha) so technically with only static objects and with every particle and light out of my scene, all I should have left is 3 draw calls, right? but for some reason, with 127 prefabs containing various instances of my meshes, I can have up to 84 draw calls. And depending on how many prefabs and where place, some that used to batch fine alone will now generate extra draw calls. Sometimes I have a single mesh that only has 1 material assigned to it generate 2 draw calls!
Important info to know: shaders used are -Unlit with light map support, -Unlit Transparent cutout with light map support -emissive with light map support.
Things get out of hand when Particles are added to the mix, they will not batch if there is transparency.
Could it have anything to do with draw order and how can I fix it?
Your answer
Follow this Question
Related Questions
Transparent shader breaks static batching? 0 Answers
Same material but lack of Single Draw Call ? 1 Answer
Reduce Draw call for Multiple GUI Textures with same Texture 1 Answer
Does Unitys built-in Sprites dynamic batching work differently and add more draw calls then needed? 0 Answers
Questions about toon basic outline shader, batching and draw call 2 Answers