2

I am developing an android game and I have some lag under the "rendering" section of the profiler even if I have just a few objects (2k triangles) and simple shaders.

I was looking at the batches section of the Unity Stats and I saw that once I start and the level is generated there are about 250 batches and the 95 % that number is saved by batching because most of my objects are static.

Online I saw that the total number of batches should be the one on the stats, in my case 27, + the number saved, in my case 256. So I thought that, even after the static batching, I had 271 batches which is too much for android.

That is when I tried to remove objects to see which one of them was creating so many batches, but every time I remove one of my static objects the saved by batching also decreases.

My question is: if I remove an object and it is decreasing also the saved by batching stat, does it mean that the object is batched well or it does not mean anything? I have actually still 271 batches or do I have to do 271 - 256 and so I have actually just 15 batches (which is perfect, but I still not understand my lag by the way).

Leoverload
  • 1,194
  • 3
  • 8
  • 21
  • https://docs.unity3d.com/Manual/DrawCallBatching.html to see if your lag actually comes from rendering you should checkout the Profiler – derHugo Mar 18 '21 at 20:38
  • Not sure why you'd be getting lag when you're at 70fps – Adam B Mar 19 '21 at 04:24
  • @AdamB I have lag when I run the game on android. The batches are the same but my fps drop to 15 – Leoverload Mar 19 '21 at 06:59
  • @derHugo I do. I have 3 ms on scripts, 3 ms on physics, 3 ms on other, and 50 ms on rendering, and that causes the lag. – Leoverload Mar 19 '21 at 07:00

0 Answers0