I'm using Prime31's UIToolkit to create the user interface and HUD of my iOS game. All was working fine until last week when suddenly I would get horrible lag bursts whenever I moved or updated an interface element, which you can see in this image, but only when running on the iPhone 4 or lower, on PC and the iPad 2 it's fine. (So, moving the joystick thumb, or updating a button with the "pressed" image for example will cause horrible stuttering.)
I've already tried rolling back my project to an earlier version yet the problem remains, so it must be caused by some change in Unity or iOS. I've tracked down the slowdown to updating the procedural mesh used for the UI. Even with only a few vertices the slow down still happens, and if I comment out the "mesh.vertices = tempVertices" assignment the slow down goes away (and the mesh isn't updated, of course), so my bottleneck isn't on the generation of the new vertex data, but on Unity's update. Anyone knows what's up? I've been banging my head on this for days now.
Answer by yuriks
Nov 18, 2011 at 11:43 PM
Just for reference, I found a workaround for what appears to be a Unity or GL driver bug: Procedural mesh update slow on iphone 4
Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.
The best place to ask and answer questions about development with Unity.
To help users navigate the site we have posted a site navigation guide.
If you are a new user to Unity Answers, check out our FAQ for more information.
Make sure to check out our Knowledge Base for commonly asked Unity questions.
If you are a moderator, see our Moderator Guidelines page.
We are making improvements to UA, see the list of changes.
Answers and Comments
2 People are following this question.
How expensive are coroutines on iPhone?
Unity Screen.SetResolution gives me black screen on iPhone 4S
Problem when building to development iPhone
iPhone 4 Loading Content Slower than iPod Touch 4