- Home /
Unaccounted time between Player end of Frame and Graphics.PresentAndSync taking up 86% of the profiler. ONLY ON IOS
Anyone ever ran into this? Like I said the game runs smooth as butter on android Mac or windows, but as soon as I put it on an iOS device the frame rate dropped to around 17-20 on my iPad.
Any ideas? Im at a lose. Thank you.
EDIT: When I disable both the plane I'm using for the ground and the directional light I use the Unaccounted time completely goes away. Its just a basic plane with a texture and a basic directional light. Nothin special.
Edit 2: Looks like it has to do with shadows, when I remove the ground (no way to cast shadows) it goes away even with the light in it.
Edit 3: It seems as though i am running into a problem on android also, but it under another name; Graphics.PresentAndSync is taking up a large portion of the cpu with absolutely nothing in the scene but a camera.
As far as i know iOS will always clamp to the nearest supported framerate. That is usually either 60, 30 or 15 fps. So if the frame time is slightly higher than 33.3ms you will immediately drop from 30 fps to 15 fps.
I don't do any iOS development anymore so i can't say much about your issue. Though we don't know much about your project ^^.
I measured frame rate by 1.0 / time.deltaTime so maybe thats not accurate? But I definitly noticed lag while playing and im guessing its that weird Unaccounted time between Player end of Frame and Graphics.PresentAndSync thing.
As far as my game goes its a pretty simple 3d target shooter with trail renders and some rigid bodies. Im also using LeanTween some also. Interestingly enough the errors do not appear in the main menu scenes or the settings.
Just checked again, runs fine on android at 60fps with Graphics.PresentAndSync taking up most of the resources.
Edit 3: Please help! If you dont know how to help, can someone please point me to someone who could help me?
I ran into the same issue, but specifically when targeting gles2 devices with ios 10 or ios 9. So far, I tested with the iPhone 5, iPad 3 and 4 and iPod touch 5. Only the iPod touch does not seem to show the issue, at least it never takes more than 0.5 ms which is ok for me. Does not show up on metal devices AT ALL. I get this in the form of spikes up to 29 ms. $$anonymous$$SAA is off in my game for devices with retina display. I use Unity 5.6.5f1 and checked with p1 but no improvement. The spikes show up in a vampire-teeth like pattern, eg. sometimes lower, sometimes higher, sometimes not at all. It is definetly not a vSync issue, even though the pattern sometimes looks like it. If I render UI-Overlay only with all cameras disabled, it does not show up. If I activate the depth pass or more than one camera, things go berserk. The spikes get in at least every third frame and peak at about 44 ms.
If we are talking about the same issue, this has nothing to do with shadows. In some situations, my game replaces realtime shadows with raycasted sprite shadows. No difference.
Graphics.PresentAndSync points at the gpu being too slow and the cpu waiting for it. So I replaced shaders with simpler ones... no difference. But I think the android-matter is probably a different issue. However, some questions remain: - What shader did you use for the plane? - Does the issue persist if you disable shadows in the quality-settings? - How is your camera cleared? Skybox? Which shader? - Unity version? - tested iOS versions? - tested iOS devices?
There are a lot of people following this question. $$anonymous$$aybe others could add their observations to this, because I think we might need to issue a well crafted bug-report here. This thing is starting to annoy me big time.
edit: Ok, this thread is not 1 month old but actually 13 months. Sweet. Probably different issues. But gives me hope that it is actually me who did something wrong
Your answer
Follow this Question
Related Questions
Unity iOS Not Returning Pages 0 Answers
Profiler Alpha Mobile 0 Answers
WTH Profiler not working with iOS? 1 Answer