The simplest FPS meter

I have tried to create a simple FPS ( frames per second ) meter. I had looked for a special engine event like rendered but did not find anything to record frames per second rate without overriding application’s methods. So I added the calculation right to the update method of FpsCounter script.

  1. Will it represent correct data?
  2. Is there a better way to get FPS rate? Maybe the Engine exposes some getter method or an attribute with actual value.

I have also found a really nice tool for counter visualisation FPSMeter . It’s suggested by Max somewhere in the Answers. So adding the link here for those who is wondering with a similar question.

2 Likes

Also worth mentioning is that we’ll soon be deploying a proper profiler for games/apps launched from the Editor. It includes an FPS counter amongst many other things. Watch this space! :smiley:

2 Likes

There is fps variable available by the engine indeed: app.stats.frame.fps. It is not yet documented, as it is part of stats API that is used for profiler panel, which is a bit work in progress still.

2 Likes