Maintain Fix FPS(frame persecond)

i was wondering if i can control the fps of the game.
Assuming i have processor which is giving more than enough FPS,lets say 60.
But i want to render it at only constant 30fps.

Is that possible by any chance?

You can use Application.targetFrameRate. 30 is very low, though; don’t do that. It’s generally better if you just use vsync.

–Eric

i wrote something like this…

function Start () {
QualitySettings.vSyncCount = 2;
}

still i am getting fps between 35-39 i want it to be near about 30.

If you want an exact framerate at all times, you could use Application.targetFrameRate to set what you want, and then do your stuff in FixedUpdate instead of Update. Beware that this’ll be bad if your computer ever can’t keep up though.