I have created a game entirely using Unity 4.6’s new UI system. It seems to run perfectly on most devices (running at either 60fps on newer devices or 30fps on the iPhone 4s/Galaxy S2).
The problem I have (as I always seem to have) is with the iPhone 4. The framerate drops heavily to around 5fps. The only thing that Unity can tell me about this is that the “Overhead” is taking around 200ms to complete. I have had a look through the other answers here and found various ways to optimise for mobile devices and cannot find anything that has made a noticeable impact.
Does anyone have any clue what this could be referring to that is specifically for iPhone 4?
Thanks in advance!
Edit: To clarify it is not vSync or the Garbage Collector. I have also set the Quality Setting to Fastest and it made no difference. Unity profiler reports the Overhead as “Other”.
Alternatively creating the sprite sheet yourself using an external tool, then importing it, works in much the same way.
The iPhone 4’s GPU seems to struggle with swapping between multiple textures. Using the sprite packer reduces the draw calls and takes the strain off the GPU.
It should be noted that, while this greatly improved performance, Unity UI does not batch font textures. So each new font you use is an additional draw call for that layer. I’d recommend baking text where possible, though this may not be ideal for localisation.