- Home /
Batching to IOS not working ???
So my game 'appears' to be well optimised. In the Unity player the batching appears to be working - there are only 6 or 7 draw calls ... However when i build to iPhone... the batching is simply not working... i'm losing 20 frames per second just for putting 40 quite small sprites on screen. it's an iphone4 and i'm really sure the problem is not in the update loop or anthing. it's the simple act of rendering a few objects that should be batched that is slowing it down. I do create all my own gameObjects in code. This has never been a problem exporting to Android but this is the first time i've gone Unity to IOS and this has just cropped up right at the end.
Any clues Greatly appreciated!
EDIT
here is the output from the IOS built in profiler
iPhone Unity internal profiler stats: cpu-player> min: 22.6 max: 51.0 avg: 25.6
cpu-ogles-drv> min: 1.0 max: 1.9 avg: 1.1
cpu-present> min: 0.8 max: 5.4 avg: 1.5
frametime> min: 26.9 max: 66.9 avg: 30.8
draw-call #> min: 11 max: 11 avg: 11 | batched: 92
tris #> min: 298 max: 302 avg: 300 | batched: 200
verts #> min: 632 max: 640 avg: 637 | batched: 405
player-detail> physx: 0.4 animation: 0.0 culling 0.0 skinning: 0.0 batching: 1.2 render: 7.4 fixed-update-count: 1 .. 3
mono-scripts> update: 15.5 fixedUpdate: 0.0 coroutines: 0.0
mono-memory> used heap: 5312512 allocated heap: 7921664 max number of collections: 1 collection total duration: 20.3
thanks :)
Hi Graham, hmm i don't have PRO IOS ... so the profiler isn't connecting... i think... i have UNITY PRO just not the pro ios...
purely FWIW . not to sound like a broken record but if you use 2DToolkit, which is extremely popular for 2D in Unity, it utterly takes care of everything for you. you get "one draw call" implementation no matter what the platform etc. it's pretty hard to beat.
I asked what the built-in profiler says, not the Pro-only profiler. :-)
ah thanks for the tip... hmm, i'm getting the feeling i was wrong about the batching... i've pasted the output from the profiler in an edit above...