My game plays fine in editor, desktop, and web; however, when I run it on my Android phone it has a framerate jitter every 5 to 7 seconds or so. The jitter doesn't seem to be correlated to any specific part of the game. It happens when a lot of physics calculations are going on, and while all of the rigibodies and colliders are removed.
I have tested my game on my Droid X, 1GHZ OMAPP CPU, and an EVO 4G, 1GHZ Snapdragon CPU. Spare the jitters, the frame rate stays at a constant range of 60 to 70 FPS.
On a last note, I am using the trial version of Unity Android. I'd be happy to hear this issue only comes up in the trial version.
Thanks in Advance.
Do you have a lot of heap allocations (new'ing objects)? It sounds a bit like the garbage collector might be the culprit. See the iOS script optimization guide for hints to control garbage collection.
You can also try to use adb logcat. IIRC garbage collection events are logged, so you might be able to see if your jitters correspond to garbage collection events.
answered Oct 11 '11 at 06:28 AM