targetFrameRate & vSync for iOS

Heya folks…

I was wondering, does Application.targetFrameRate, works on iOS? In the docs it says:

If vsync is set in quality setting,
the target framerate is ignored, and
the vblank interval is used instead.
The vBlankCount property on
qualitysettings can be used to limit
the framerate to half of the screens
refresh rate (60 fps screen can be
limited to 30 fps by setting
vBlankCount to 2)

And in the Unity Answers i read, that vsync is allways ON, for iOS and cannot be turned off…

The interesting thing is if i turn it Off and set targetFrameRate to 30, the game runs on exactly 30FPS (Where it was running with 50FPS, before that).

SO what’s right and what’s wrong?

Can i turn Off vSync for iOS? If no, then this means that targetFrameRate is useless? If so, how can i tell the game to run at specific frame rate?
That was the first question.

Shoud i limit the FPS, by setting the VSync Count to “Every Second VBlank” ?

Second one: My game runs on iPad4, iPhone5 with 50, 60 FPS, and on iPad Mini, iPod touch with 30, 45 FPS. Shoud i limit the game to 30FPS, or i shoud leave it to decide by it’s own, on what FPS to run. Apparently the Unity engine is doing some stuff behind, cuz if i don’t limit it the game runs pretty well…

thanks

iOS devices are always vsynced and that can’t be changed. By default the framerate is capped at 30; you can use Application.targetFrameRate to change it to 60.

Hi instruct9r,

I was running into some of this today myself. My experience with Unity Beta 4.6b18 is that setting Application.targetFrameRate does indeed work on the iPhone. At least it worked for me if I set it to 60. Without setting that I was unable to change the frame rate to be higher than 30fps on iPhone 5/ or 6. Other threads have commented that vsync with Unity can be problematic sometimes (which for me seems to lead to jerky motion just moving a sprite around in a 2D game).

In terms of choosing a frame rate I think if it can run faster, why not let it run faster. As long as your game is frame rate independent it should be fine, assuming of course you don’t have random frames with huge times here and there causing rough/jerky frame rate.

Also, would like to point this out (post #7) https://forum.unity.com/threads/device-present-in-profiler-what-the-deal.86312/#post-564383