- Home /
Device.Present goes crazy?
We recently updated from 3.4 to 3.5 and today I noticed a really weird behaviour on Android. (tested with Galaxy SII) From time to time the game seems to stop for 1+ second. Although staring at it for about an hour I couldn't find any pattern in when this happens and when not, only that after some time it happens regularly (approx. every 5 - 10s).
Looking at the logcat profiler and the editor profiler while running the game on the device showed that the stops are caused by cpu-present or more specific the Device.Present function. While most of the game runs with an average frametime of ~20ms with spikes not exceeding 35 on some frames the Device.Present function takes up more than 1 second, which seems ridiculous.
Any idea what could cause this? I hadn't noticed this behaviour while using 3.4, so I am suspecting a bug, but I am not sure when this behaviour started exactly.
Answer by srmojuze · Jul 09, 2016 at 08:20 AM
Note: This issue is popping up in 2016, Unity 5.3.x and is top on Google searches, hence my reply...
Most likely a bug when building a "fat" binary (ARM+ x86) or (ARM + ARM64(?)). Destroys framerates for some reason. Building for ARM only helped somewhat.
Answer by dannyskim · Feb 24, 2012 at 06:26 PM
Hmmm.. Have you looked at your Quality Settings for your project? I had issues with a lot of settings getting changed around when I imported and updated a project to be compatible with 3.5.
I actually had issues with this before. My behavior was quite different from what you were explaining, but this was with 3.4.1f5 I believe. Try changing the VSync Count to Don't Sync, I believe in 3.5 it's defaulting to Every VBlank even on lower settings such as 'Good.'