Get current frame time / fps in Blueprint?

Is it possible to get the frame time from the last frame or alternatively the current fps with Blueprint? I need simply the numbers from the console commands ‘stat unit’ or ‘stat fps’.

1 Like

I am reasonably sure that there is a Get World Delta Seconds blueprint node. Failing that, the Event Tick event node has a DeltaSeconds paramater. DeltaSeconds is the that has passed since the last frame rendered. You can use this information, with a little math, to get the current frames per second.

2 Likes

Thank you, I’ll gonna try that.

Here’s how I did it using a UMG widget:

It is pretty accurate

12 Likes

Oh my god, you saved me, you are so amazing!!

if you want to get FPS exactly as are shown in “viewport stats” option, in c++ create function:
float Your_CPP_CLASS::GetCurrentFPS()
{
extern ENGINE_API float GAverageFPS;
return GAverageFPS;
}

and then expose it to blueprints