#ī¸âŖFPS Counter
Calculates and displays the actual framerate rendered
Last updated
Calculates and displays the actual framerate rendered
Last updated
This component is helpful for monitoring framerates at runtime with a custom display. The frames per second (FPS) is tallied each second for an accurate account of the number of frames rendered.
To add this script to an object, use the built-in Add Component menu and search for FPSCounter.
This component is not a Timeflow behavior and may be used with or with an active instance of Timeflow.
The output value can be mapped to any string or numeric property to display the framerate.
When mapped to a string property, the prefix text is displayed in front of the value. For example, "FPS:60". Leave this field blank if you wish to only display the numeric FPS value.
When this option is enabled, you may additionally define colors to display when the FPS is lower or higher than the target framerate. This can be a helpful indicator during runtime to clearly see when the FPS is dropping below the desired rate.
When the Target FPS Color option is enabled, an additional property mapping field may be assigned to any color property. For example, this can be used to set the display text color.
This option is only available in the editor and is used to capture framerate data to a Graph behavior, viewed in the Timeflow graph view. This is useful as a diagnostic tool to discover areas of an animation that are causing a performance dip. This may be due to objects being activated or deactivated or other events that are resulting in framerate loss.
You may also record multiple Graphs over different sessions and compare them in the Timeflow view to see how changes in the scene or animation affect performance.