I have a 2d game that is nearing completion. I tried upgrading it from Unity 5.1.3p2 to 5.2.0f3 and noticed it was much choppier than before when playing on the device (an iPad 3). So, I made some development builds to see what the profiler had to say…
The frame rate is much worse, with lots of spikes that bring it down to 30 fps. It is very choppy on the device.
Camera Render and Overhead are still the most time consuming.
Camera Renderer is about the same as before (if not slightly better).
The spikes in the image are Overhead which hiccups to > 20 ms every 3 frames (exactly).
None of the other items were noticeably worse than before. Also, no single item followed the “every 3 frames” Overhead spikes. There was no obvious smoking gun.
I haven’t dug in too deep, but I did try a few different build settings. None of these made a difference:
Switching from IL2CPP back to Mono
Turning off the new Vertex Compression (which is on by default).
I’m just going to stay on 5.1 for now, but I’m curious if anyone else has had a similar problem or thoughts.
I to have much odd behavior and slow down on 2D 5.2 game.
I just wish to know if before each release Unity QA conduct any mobile performance tests.
To me the answer is pretty much NO or really basic low level.
I guess they need to hire some performance testers (different to standard)
5.1x Android, FPS was decreased majorly
5.2x I just hope same thing does not happen to iOS.
The problem seems confined to my iPad 3. I ran the same tests on an iPad Mini 1st gen, an iPhone 4s, an iPod Touch 5th gen, and an iPhone 6 plus. On those devices, performance was as good or better with 5.2.
Here is a composite image of 2 frames from the profiler Timeline view. It shows a normal frame above a hiccup frame. You can see that after PlayerEndOfFrame, there is a much larger empty gap before Grahics.PresentAndSyc during a hiccup. This pattern repeats itself every 3 frames like clockwork.
And, please, come back and post the bug link here if you could. I tried my first iOS build with 5.2 yesterday and got terrible performance on my iPod 5th gen. I lost a full 20 fps on what used to hover around 55-60. It was also not just bad framerate, it was jittery too. Like the framerate was both bad and inconsistent.
Yes, it is definitely very jittery for me as well (makes my game unplayable). You can see the jitters in the profile pictures where the spikes occur and push the framerate down to 30 from 60.
I haven’t filed a bug report because I didn’t have a simple project that could reproduce the issue (and I can’t upload my full project for business reasons). However, I spent some time attempting to narrow down the issue and have some new data that I will post shortly…
There was definitely a change in 5.2.0f3 regarding how the iOS device syncs with the screen refresh, vs how it worked in 5.1.3.p2.
I made a test project that switches Application.targetFrameRate between 3 values [60, 30, -1]. I compiled this project with both versions of Unity and profiled them on my iPad 3rd generation. Here are the results:
Notice that the game smoothly stays within its desired frame rate. When asked to run at 60 or 30 fps, it does so. When asked to run as fast as it can (with the value of -1), it behaves the same as at 60. This makes sense, because iOS devices are locked to a max screen refresh of 60 (as far as I know).
Notice the spikes when targeting 60 fps. As mentioned, it is actually worse than just running at 30 fps because it constantly jitters between 60 and 30. Oddly, switching to 30 seems to let it run as fast as it can (> 100 fps). Switching to -1 gave the exact same results as setting to 60.
A few more points:
Spikes don’t always happen exactly at every 3 frames like my original posting. It depends on the scene.
The spikes don’t occur on an empty scene. It needed to have some objects to render (I used 2d sprites).
When testing on a 4s, I got different results. The 5.1 build results were identical. For 5.2, it ran at > 120 fps, regardless of the settings. My guess is that if I made a more demanding scene, it would start showing the spikes (the iPad 3 has to draw many more pixels than the 4s). In either case, it shows a change in how drawing to the screen is done under 5.2.
Even when the profiler says the game is rendering at > 100 fps, the experience on the device can still feel jittery with the 5.2 build.
Conclusion:
Something has gone wrong with iOS rendering on 5.2 This was demonstrated above by switching Application.targetFrameRate settings, but the underlying problem might be elsewhere. What is known is that scenes that rendered at consistent framerates under 5.1 (across different devices) can behave erratically under 5.2.
I will post a bug later today and link to it here.
I haven’t looked to much into my problems, but I have a 2D game too, build in NGUI mostly, and I noticed bad performance even on my iPhone 6.
Please update this thread when a solution is found - apparently you are not alone with this problem.
I upgraded to Unity3d 5.2.0p1 and the final iOS 9 release at the “same” time…so I actually not sure if it’s iOS or Unity that make my game less smooth… but as I see here more have similar problems, I guess it is Unity3d that takes the honor
We are still using Unity 4.6.8f1, and we encountered similar performance issue while running our game on iOS 9.0.1. The exact same build runs totally fine on iOS 8.4, the frame rate dropped to about a half on iOS 9 and the profiler shows similar spikes on iOS9, 9.0.1 and 9.1 beta. I wonder whether it is actually an iOS9 issue or we got two issues at the same time.
I’m not sure, but to me it sounds like two bugs at the same time - spice up the mix of difficulties
I upgraded to iOS 9 at the same time as Unity3d 5.2 (totally stupid me I know…) so I don’t know what introduced the bug on my phone. But my betatesters are all reporting worse performance in the release I pushed out yesterday, and I haven’t changed anything that can impact performance on all scenes in the game.
Bug reports get things moving quickly, forum reports do not. More than one bug report can raise the priority of an issue, esp with more data (test scenes from different people). You can also link forum threads for more rich data for them.
Well, I get that, but one bug is already reported and it is linking to this thread, so the dev reading it get here and see multiple people having the issue.
I know that will not make the bug report look important, before someone reads all the way through it, but I cannot see the bug listed on the issue tracker yet…if it was there, I would upvote it
I’m just telling you how it is, not negotiating or discussing or anything. It’s how it works. It goes first through QA who have to decide if its real or not, long before it gets to a developer. Also, QA might well fix this at the gate, and in any case:
more reports = more machine/os/unity specs etc - its just more unique data which does very much help. Some bugs are pretty tricky to nail with just one report when there’s 22 platforms and so on
Actually, Unity QA should monitor forums and gives these issues top priority…
If one person posts and finds a killer bug, and 100 find a basic stupid bug with low priority, the one 100 ppl found bug gets fixed. Not how it should be, there needs be a balance… Please lets not go off topic because each time someone finds a critical bug the bug reporting issues come up and debates start…Let people speak in the forums and express there concerns and issues…its there choice if they file bug report or not…maybe if people had more faith in the process then everyone one will report…I’m surprised as a moderator who on forum each day you not realized the problems and issues…
And you know better, how? This process evolved because monitoring the forums is impractical in reality, and mostly doesn’t work, for many, many proven reasons.
To get back to topic…I tried to set the Vertex Compression to “None” in my game, and it feels like it speeded up my game. I haven’t tested with a FPS counter, but it seems to the naked eye that this improved performance.
I’m on Unity3d 5.2.0p1, testing on iPhone 6 with iOS 9.0.1.
The specific case I posted definitely isn’t related to iOS 9. I verified the behavior under iOS 6, 7, and 8. The test case is also narrowed down so that switching between Unity 5.1 and 5.2 is the only variable. Of course, that doesn’t mean there aren’t separate issue with iOS 9.