Cocos Creator 3.4.0. Different draw calls count on preview and build

Hi all. I read articles how to reduce draw calls. I used advices:
Created auto-atlas and using Bitmap Cache mode for all labels, and I really got only one draw call for whole pop-up what is using 30+ sprites and labels.

But I don’t understand, why when I make build on web platform and run this build, I see draw calls again become huge. I don’t know what I am doing wrong? Why in preview they 2 (+1 show fps), but in built version are 30+?

In the screenshots, I am not used the whole pop-up, but you can see draw calls increased in web mobile build.

Preview screenshot:


Web mobile build screenshot:

ok I did some research with selector.js and what I found…
When I pack all my images into one auto-atlas - every label interrupts batching:

When I do not pack item icons (gems on screenshot, and other in pop-up) and pack just frames, buttons background, panels I’m getting 1 draw call, but I don’t understand how? If my panels and buttons is in auto-atlas, icons aren’t there…? They should interrupt batching as labels above.

I am wondering my panels also go to the dynamic atlas, but why I need auto-atlas then?

When I turn off dynamic atlas in the script and pack all images, labels also start to interrupt batching, they also require draw call for every label. Without labels, I am getting 1 draw call for whole pop-up.

When I turn on dynamic atlas and pack all images into auto-atlas - labels interrupts batching.

Please help me to understand this. What option should I use?

I’ll ask engineering to chime in.

I have test it , draw call in preview and build is all 2. Here is my demo:
55271.zip (4.0 MB)


Could you offer your demo to me?

It was because my images were in auto-aulas, texts maybe cache to the dynamic atlas. Now I just use different container for texts. Thanks. But I think it would be cool if cocos could pack text to the auto-aulas dynamically in the game.

Have you set the packable property of spriteFrame to false?

if I set to false it pack to dynamic atlas draw calls is 2. but we can’t pack all images and texts to dynamic. also if they in dynamic the loading of resources duration is 6 sec. in auto atlas 0.5 ms.
So I wrote an script what change parent for all texts to separate node. now draw calls are 2
.

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.