- Home /
DrawCalls affected by localScale?
I'm instantiating 1000+ copies of a Game Object, and I'm getting around 300 drawcalls. When I randomly change the localScale of each copy, the batching does a much better job and I have about 18 draw calls. In all other respects they are identical except for position and localScale.
I've read the docs, but I can't figure out how changing the copies could positively influence the number of drawcalls.
Has anyone any clues to what be going on with the batching?
Thanks
Steve
Answer by Tanshaydar · Oct 05, 2014 at 02:13 PM
http://docs.unity3d.com/Manual/DrawCallBatching.html
Generally, objects should be using the same transform scale. The exception is non-uniform scaled objects; if several objects all have different non-uniform scale then they can still be batched.
So, if you import objects, prefab them and there is something preventing batching to work fully, nonuniform scaling might be advantageous for your case.
Thanks, that's the conclusion I'm co$$anonymous$$g to, but it's a bit of a black-box, I can't imagine what's going on in Unity's logic.
All original transforms… yup, batch.
All similarly scaled… nope!
All scaled non-uniformly… Oh, ok then! :)
Yeah, batching as both dynamic and static is a bit of a blackbox. Sometimes you will need to experiment with it. Old documents had more information technical wise I remember, but now it's even more of a blackbox.
Answer by Tepei · Oct 05, 2014 at 02:11 PM
I'm noob to this but maybe wheen an object is in front of an another one or with transparency if you use it could change the dynamic batching that reduce the draw call ..
Nice idea, but no, there was no overlap hiding/showing happening.
Your answer
![](https://koobas.hobune.stream/wayback/20220613164429im_/https://answers.unity.com/themes/thub/images/avi.jpg)