FramesPerSecond

Author: Aras Pranckevicius (NeARAZ)

Description
Use this script on a GUIText object to display a FPS (frames per second) indicator.

It calculates frames/second over a defined interval, so the displayed number does not keep changing wildly. It is also fairly accurate at very low FPS counts (<10). The frames per second remain accurate if the time scale of the game is changed.

Note that in the web player, the frame rate is capped at 60fps by default - you can increase this by using Application.targetFrameRate.

CSharp HUDFPS.cs
A C# implementation of the above converted by Opless. The main difference is the colour change when FPS dips too low.

Boo FPS_Display.boo
A Boo implementation of the above converted by Philbywhizz.

Other CSharp HUDFPS.cs
A different implementation of HUDFPS. Just attach it to a gameobject.

Other UnityScript HUDFPS.js
A different implementation of HUDFPS. Just attach it to a gameobject.

FPSCounter.cs
Yet another FPS counter. This one output fps value to a property as well as GUItext component attached to the same gameobject. It use no Update event and need only one division to perform the calculation. It seem to provide good enough data to me. Please let me know if it's not?

FPSDisplay.cs
Author: Dave Hampson Here is a FPS Display script I created. It doesn't require a GUIText element and it also shows milliseconds, so just drop it into a GameObject and you should be ready to go. Hope someone finds it useful!