- Home /
Help with batching
Hey!
I'm trying to optimize some aspects of my game, and can't seem to find any solution to this problem:
It looks like there is NO Static Batching going on (even though I marked every non-moving Mesh as static) and Dynamic Batching is limited at best. The number of Draw Calls is something that is driving me nuts, since there are no more than 50 GameObjects on screen.
Would anyone know what I may be doing wrong? I am using URP 8.2.0, with the 2D Renderer and using 2D lights.
Thanks in advance
Are you sharing materials amongst the objects that you wish to batch?
Do you have a lot of particles?
How many shared materials do you have?
Hey! Thanks for answering. Let me answer back point by point:
Yeah, I'm sharing materials between all of the Static Objects and all of the sprites.
There were no particles active in the scene at that moment.
I have 1 material for all Sprite Renderers (there are at most 20 different Sprites active on screen) 1 material for all of the floors and 1 material for backgrounds.
Do you have any clue why this may be happening? Is it a quirk of Unity's 2D lighting system?
Your answer
Follow this Question
Related Questions
Extrange Behaviour with 2D Lights in Universal RP 0 Answers
Why can't I batch some draw calls? 0 Answers
URP 2D lights not working as expected 6 Answers
URP Lit 2D Sprite Shader Texture 0 Answers