MMFeedbacks  v1.6
Public Attributes | Protected Member Functions | Protected Attributes | List of all members
MoreMountains.Tools.MMFPSCounter Class Reference

Add this class to a gameObject with a Text component and it'll feed it the number of FPS in real time. More...

Inheritance diagram for MoreMountains.Tools.MMFPSCounter:

Public Attributes

float UpdateInterval = 0.3f
 The frequency at which the FPS counter should update (in seconds) More...
 

Protected Member Functions

virtual void Start ()
 On Start(), we get the Text component and initialize our counter More...
 
virtual void Update ()
 On Update, we increment our various counters, and if we've reached our UpdateInterval, we update our FPS counter with the number of frames displayed since the last counter update More...
 

Protected Attributes

float _framesAccumulated = 0f
 
float _framesDrawnInTheInterval = 0f
 
float _timeLeft
 
Text _text
 
int _currentFPS
 

Detailed Description

Add this class to a gameObject with a Text component and it'll feed it the number of FPS in real time.

Member Function Documentation

◆ Start()

virtual void MoreMountains.Tools.MMFPSCounter.Start ( )
protectedvirtual

On Start(), we get the Text component and initialize our counter

◆ Update()

virtual void MoreMountains.Tools.MMFPSCounter.Update ( )
protectedvirtual

On Update, we increment our various counters, and if we've reached our UpdateInterval, we update our FPS counter with the number of frames displayed since the last counter update

Member Data Documentation

◆ _currentFPS

int MoreMountains.Tools.MMFPSCounter._currentFPS
protected

◆ _framesAccumulated

float MoreMountains.Tools.MMFPSCounter._framesAccumulated = 0f
protected

◆ _framesDrawnInTheInterval

float MoreMountains.Tools.MMFPSCounter._framesDrawnInTheInterval = 0f
protected

◆ _text

Text MoreMountains.Tools.MMFPSCounter._text
protected

◆ _timeLeft

float MoreMountains.Tools.MMFPSCounter._timeLeft
protected

◆ UpdateInterval

float MoreMountains.Tools.MMFPSCounter.UpdateInterval = 0.3f

The frequency at which the FPS counter should update (in seconds)


The documentation for this class was generated from the following file: