- Home /
Multiple draw calls from a single Sprite atlas when loading from Asset bundle
Hi Guys,
I am using Unity 2018.4.13f1 for one of my 2D application. Facing issue with draw calls when using sprite atlas.
I have a Scene with multiple sprites for my game background. Sprites are packed into a single sprite Atlas of size 2048x2048.
When I run this scene, sprites are loaded just fine and on checking the frame debugger, I can see that all sprites are rendered in a single draw call. This is what was expected as well.
I now generate the asset bundle for the background with the option Include in build selected for sprite atlas. Then, load this asset bundle in my main application.
No runtime changes done to any of the objects loaded from asset bundle. I can see that all sprites are loaded fine. However when I check the frame debugger, I see that there are multiple draw calls. Specifically in this case, 7 draw calls. My expectation was to have just a single draw call.
Note: In the frame debugger I can confirm that sprite atlas is being used. Without sprite atlas draw calls just for background would be more than 30. This confirms that sprite atlas is being used but not getting the expected result. I can also confirm that it is a single sprite atlas of size 2048x2048 and sorting layer and order in layer is set appropriately.
Is there any reason for this higher draw calls in the main application when background is loaded from asset bundle?
Can anyone suggest me a way to fix this?
Thanks in advance.
Your answer
Follow this Question
Related Questions
Which sprite atlas goes into an asset bundle? 0 Answers
Increase Draw Calls at using AssetBundles 0 Answers
Using Sprite Atlas with Asset Bundle 0 Answers
Managing your sprites in a project question. 0 Answers
Sprite Editor/Pack Atlas Question for 2D Animating 0 Answers