- Home /
Draw Calls Not Reduced After Adding Texture Atlas.
I'm working on a simple mobile 2D game. Currently there are 20 draw calls. To minimize the draw calls number, I put all the graphics into a Texture Atlas using the Sprite Packer. I expected a reduction down to about 5 draw calls. Surprisingly, I'm not seeing any decrease in the number of draw calls.
I tried to replicate this scenario in a clean project and everything works as expected. So, this is probably not a Unity bug, but rather something in my original project that is preventing Unity from optimizing the number of draw calls.
Any suggestions how to fix that?
are you accessing the material property of the sprite renderer, creating duplicates that break batching? in play mode you see that is it says instance next to the material name.
are you using a correct sprite shader?
Thanks for responding to my question!
1) No, I'm not accessing the material property in my code and there are no duplicates.
2) I have "$$anonymous$$aterial: None" selected, for everything in the UI, so there's no explicit shader setting.
Sorry, I'm new to this, so perhaps I'm missing something obvious to an expert.
to my surprise I just had the same problem today so I'm as baffled as you are right now
Your answer
Follow this Question
Related Questions
Texture atlases on iphone 3 Answers
DrawCall results are strange 0 Answers
Reducing drawcalls on texture atlas animation 0 Answers
SkinnedMeshRenderer offset UVs to match texture atlas? 1 Answer
How To Apply A Texture Atlas For UI Image Objects? 0 Answers