I’m trying to do some performance enhancements to my UI heavy Augmented Reality app. I’m using Unity 4.6 new uGUI. But the draw call amount is not in an acceptable range. Somewhere near 100 draw calls on some screens. My target platform is mobile (iOS and Android) so this is not good at all.
- UI texture import settings
- Texture type : Sprite (2d and UI)
- Sprte mode : single
- Packing tag : atlas
- Canvas settings
- Render mode : Screen space overlay
- I have multiple Canvases in one ‘Screen’
- No Camera apart from the AR camera that does not render UI (Since it’s Screen space overlay, UI looks and behaves fine without a Camera)
- All the UI elements are packed into one ‘atlas’ essentially
- Mac OSX 10.9.5
- Unity 4.6.0 Patch 1 (tested on 4.6.0 as well. Same result)
I’m generating sprite atlas using Unity built in ‘Sprite Packer’ tool and as I’ve read on the documentation it should use the atlas in the background without me having to doing anything else. So my individual UI elements refer to the sprite not the atlas. But as I’ve understood it, Unity should use the created atlas in the background. Right? or do I have to do something else here?
But I still get a lot of draw calls where I should get only one. I’ve attached this screen capture to illustrate the issue.
This screen should only have one draw call as all the assets used in here are in one atlas.
Does anyone know what’s going on or what I’m doing wrong.
Sorry for the long winded explanation BTW.