Hello
Guest
Home
Help
Search
Login
Register
2D Toolkit Forum
»
2D Toolkit
»
Support
»
Too many draw calls, need help
« previous
next »
Print
Pages: [
1
]
Author
Topic: Too many draw calls, need help (Read 5112 times)
Roundabout1776
Newbie
Posts: 6
Too many draw calls, need help
«
on:
October 21, 2014, 10:18:25 am »
Hi, i'm using 2.4.0
At some point (can't remember when exactly) I started to get way too many draw calls for a very simple game.
I'm using a single atlas (4096x4096) and got around 60 sprites. 50 of them have simple box collider generated by CreateSimpleBoxCollider()
So how can I solve this kind of problem?
Logged
AlexGK
Newbie
Posts: 3
Re: Too many draw calls, need help
«
Reply #1 on:
October 22, 2014, 08:10:27 am »
Are those sprites static? If so, then you can merge them into a static sprite batch:
http://www.unikronsoftware.com/2dtoolkit/docs/latest/tutorial/using_the_static_sprite_batcher.html
Logged
Roundabout1776
Newbie
Posts: 6
Re: Too many draw calls, need help
«
Reply #2 on:
October 23, 2014, 08:24:47 am »
Hi AlexGK
No, those sprites are not static. also i noticed that single sprite uses 4 drawcalls + 2 draw calls if there is collider on it
Logged
unikronsoftware
Administrator
Hero Member
Posts: 9709
Re: Too many draw calls, need help
«
Reply #3 on:
October 24, 2014, 07:14:12 pm »
The draw call count includes invisible gizmos, these don't exist in game. Don't ask me why, thats what Unity does. It will go back down once you turn off gizmos in the game view.
Logged
pedrohbalmeida
2D Toolkit
Newbie
Posts: 7
Re: Too many draw calls, need help
«
Reply #4 on:
May 21, 2015, 06:17:39 pm »
I was about to have a heart attack with 4k draw calls... Turning off gizmos statistics went off to 9 draw calls
Logged
Print
Pages: [
1
]
« previous
next »
2D Toolkit Forum
»
2D Toolkit
»
Support
»
Too many draw calls, need help