Advanced FPS Counter  1.4.0
FPS Counter on steroids!
FPSCounterData Class Reference

Inherits UpdatableCounterData.

Public Member Functions

void ResetAverage ()
 
void ResetMinMax (bool withoutUpdate=false)
 
void Refresh ()
 

Public Attributes

int warningLevelValue = 50
 
int criticalLevelValue = 20
 
bool resetAverageOnNewScene
 
bool resetMinMaxOnNewScene
 
int minMaxIntervalsToSkip = 3
 

Properties

bool RealtimeFPS [get, set]
 
bool Milliseconds [get, set]
 
bool Average [get, set]
 
bool AverageMilliseconds [get, set]
 
bool AverageNewLine [get, set]
 
int AverageSamples [get, set]
 
bool MinMax [get, set]
 
bool MinMaxMilliseconds [get, set]
 
bool MinMaxNewLine [get, set]
 
bool MinMaxTwoLines [get, set]
 
bool Render [get, set]
 
bool RenderNewLine [get, set]
 
bool RenderAutoAdd [get, set]
 
Color ColorWarning [get, set]
 
Color ColorCritical [get, set]
 
Color ColorRender [get, set]
 
int LastValue [get]
 
float LastMillisecondsValue [get]
 
float LastRenderValue [get]
 
int LastAverageValue [get]
 
float LastAverageMillisecondsValue [get]
 
int LastMinimumValue [get]
 
int LastMaximumValue [get]
 
float LastMinMillisecondsValue [get]
 
float LastMaxMillisecondsValue [get]
 
FPSLevel CurrentFpsLevel [get]
 
float UpdateInterval [get, set]
 
bool Enabled [get, set]
 
LabelAnchor Anchor [get, set]
 
Color Color [get, set]
 
FontStyle Style [get, set]
 
string ExtraText [get, set]
 

Events

Action< FPSLevelOnFPSLevelChange
 

Detailed Description

Shows frames per second counter.

Member Function Documentation

◆ ResetAverage()

void ResetAverage ( )
inline

Resets Average FPS counter accumulative data.

◆ ResetMinMax()

void ResetMinMax ( bool  withoutUpdate = false)
inline

Resets minimum and maximum FPS readings.

◆ Refresh()

void Refresh ( )
inlineinherited

Updates counter's value and forces current label refresh.

Member Data Documentation

◆ warningLevelValue

int warningLevelValue = 50

If FPS will drop below this value, ColorWarning will be used for counter text.

◆ criticalLevelValue

int criticalLevelValue = 20

If FPS will be equal or less this value, ColorCritical will be used for counter text.

◆ resetAverageOnNewScene

bool resetAverageOnNewScene

Average FPS counter accumulative data will be reset on new scene load if enabled.

See also
AverageSamples, LastAverageValue

◆ resetMinMaxOnNewScene

bool resetMinMaxOnNewScene

Minimum and maximum FPS readings will be reset on new scene load if enabled.

See also
LastMinimumValue, LastMaximumValue

◆ minMaxIntervalsToSkip

int minMaxIntervalsToSkip = 3

Amount of update intervals to skip before recording minimum and maximum FPS. Use it to skip initialization performance spikes and drops.

See also
LastMinimumValue, LastMaximumValue

Property Documentation

◆ RealtimeFPS

bool RealtimeFPS
getset

Shows realtime FPS at the moment of the counter update scene start. Allows to hide FPS readout if necessary.

See also
LastValue

◆ Milliseconds

bool Milliseconds
getset

Shows time in milliseconds spent to render 1 frame.

See also
LastMillisecondsValue

◆ Average

bool Average
getset

Shows Average FPS calculated from specified AverageSamples amount or since game / scene start, depending on AverageSamples value and resetAverageOnNewScene toggle.

See also
LastAverageValue

◆ AverageMilliseconds

bool AverageMilliseconds
getset

Shows time in milliseconds for the average FPS.

◆ AverageNewLine

bool AverageNewLine
getset

Controls placing Average on the new line.

See also
Average

◆ AverageSamples

int AverageSamples
getset

Amount of last samples to get average from. Set 0 to get average from all samples since startup or level load. One Sample recorded per one UpdateInterval.

See also
resetAverageOnNewScene

◆ MinMax

bool MinMax
getset

Shows minimum and maximum FPS readouts since game / scene start, depending on resetMinMaxOnNewScene toggle.

◆ MinMaxMilliseconds

bool MinMaxMilliseconds
getset

Shows time in milliseconds for the Min Max FPS.

◆ MinMaxNewLine

bool MinMaxNewLine
getset

Controls placing Min Max on the new line.

See also
MinMax

◆ MinMaxTwoLines

bool MinMaxTwoLines
getset

Check to place Min Max on two separate lines. Otherwise they will be placed on a single line.

See also
MinMax

◆ Render

bool Render
getset

Shows approximate time in ms spent on Camera.Render excluding Image Effects and IMGUI. Requires AFPSRenderRecorder added to the cameras you wish to count.

NOTE: It doesn't take into account Image Effects and IMGUI!

See also
LastRenderValue
AFPSRenderRecorder

◆ RenderNewLine

bool RenderNewLine
getset

Controls placing Render on the new line.

See also
Render

◆ RenderAutoAdd

bool RenderAutoAdd
getset

Check to let FPS Counter try automatically add AFPSRenderRecorder to the Camera with MainCamera tag.
You're free to add AFPSRenderRecorder to any cameras you wish to count.

See also
Render

◆ ColorWarning

Color ColorWarning
getset

Color of the FPS counter while FPS is between criticalLevelValue and warningLevelValue levels.

◆ ColorCritical

Color ColorCritical
getset

Color of the FPS counter while FPS is below criticalLevelValue.

◆ ColorRender

Color ColorRender
getset

Color of the Render Time output.

◆ LastValue

int LastValue
get

Last realtime FPS value.

◆ LastMillisecondsValue

float LastMillisecondsValue
get

Last calculated Milliseconds value.

◆ LastRenderValue

float LastRenderValue
get

Last calculated Render Time value.

See also
Render

◆ LastAverageValue

int LastAverageValue
get

Last calculated Average FPS value.

See also
AverageSamples, resetAverageOnNewScene

◆ LastAverageMillisecondsValue

float LastAverageMillisecondsValue
get

Last calculated Milliseconds value for Average FPS.

◆ LastMinimumValue

int LastMinimumValue
get

Last minimum FPS value.

See also
resetMinMaxOnNewScene

◆ LastMaximumValue

int LastMaximumValue
get

Last maximum FPS value.

See also
resetMinMaxOnNewScene

◆ LastMinMillisecondsValue

float LastMinMillisecondsValue
get

Last calculated Milliseconds value for Minimum FPS.

See also
resetMinMaxOnNewScene

◆ LastMaxMillisecondsValue

float LastMaxMillisecondsValue
get

Last calculated Milliseconds value for Maximum FPS.

See also
resetMinMaxOnNewScene

◆ CurrentFpsLevel

FPSLevel CurrentFpsLevel
get

Current FPS level.

See also
FPSLevel, OnFPSLevelChange

◆ UpdateInterval

float UpdateInterval
getsetinherited

Update interval in seconds.

◆ Enabled

bool Enabled
getsetinherited

Enables or disables counter with immediate label refresh.

◆ Anchor

LabelAnchor Anchor
getsetinherited

Current anchoring label for the counter output. Refreshes both previous and specified label when switching anchor.

◆ Color

Color Color
getsetinherited

Regular color of the counter output.

◆ Style

FontStyle Style
getsetinherited

Controls bold text style.

◆ ExtraText

string ExtraText
getsetinherited

Additional text to append to the end of the counter in normal Operation Mode.
Refresh() will be called on change.
Set to null to remove extra text.

Event Documentation

◆ OnFPSLevelChange

Action<FPSLevel> OnFPSLevelChange

Event to let you react on FPS level change.

See also
FPSLevel, CurrentFpsLevel