I’m developing a VR game and want to output my FPS or frame time in ms into a UTextRenderComponent. I can display text but cannot get or calculate the FPS. I could not find any way to that info from the engine so how do I calculate FPS inside a class derived from Pawn? I could use std::chrono but then I would need to know when a frame starts and ends.
I found the answer, it’s in the comments of an another answer:
I tried 1.0f / deltaTime in OnTick() and it works!
You may want to check the Engine class which has a number of FPS functions including Set/GetMaxFPS(). You should be able to use these functions to get information about FPS as necessary (UEngine | Unreal Engine Documentation ).