Application.targetFrameRate broken?

So, it seems to work…as long as I don’t move the mouse.

If I move the mouse (using the standard windows cursor) the framerate gets uncapped, kind of defeating the whole purpose…

Is it broken or am I doing something wrong?

I am having this problem as well (frame rate increases when giving mouse input). Did you ever solve it Acid?

It also seems to happen when I give any sort of keyboard input (it speeds up). To be more specific, keyboard and mouse input seem to funk with the Application.targetFrameRate value, overriding it somehow (maybe based on the input rate of Windows itself?). This happens when I build as a Windows standalone, no matter what resolution or graphics quality I use.

I’m on a high end machine, and when I build my game with default value for targetFrameRate, it goes ridiculously fast, and I really need to cap the speed.

I really really really need a way to solve this asap. Anyone have any ideas? Any help would be greatly appreciated!

I tested it on an XP machine (bad cpu, medium-bad graphics card), a Vista machine as well (decent cpu, bad graphics card), and the exact same thing happens. Any ideas?

You can try this.

–Eric

(I guess I’m replying a little late :stuck_out_tongue: )

Thanks Eric5h5, the script you linked works much-much more reliably that Application.targetFrameRate.

I have a usable framelimiter now.

But still, why is targetFrameRate so horribly unreliable? I’ll report it as a bug, although I guess it should be in there already.

Sounds like a bug in the Windows version…if I use targetFrameRate on OS X it always stays within .5 fps of the target, regardless of moving the mouse, which surely is the intended behavior. So yes you should report it; it’s possible nobody else has.

–Eric

Even on OSX it doesn’t work, I reported but # 382882

Works for me on OSX Unity 3.1