UKismetSystemLibrary::GetFrameCount
#include "Kismet/KismetSystemLibrary.h"
Access: public
Specifiers: staticUFUNCTIONBlueprintPure
Description
Returns the value of GFrameCounter, a running count of engine frames since process start. Useful for once-per-frame guards and lightweight profiling markers.
Caveats & Gotchas
- • This is a global engine frame counter, not a per-world or per-actor tick count — it advances even while the game is paused, since rendering frames still occur.
- • Two calls in the same frame will return the same value, which makes it a cheap way to guard against running logic more than once per frame.
Signature
static int64 GetFrameCount() Return Type
int64 Example
Guard against running logic twice in one frame C++
int64 CurrentFrame = UKismetSystemLibrary::GetFrameCount();
if (CurrentFrame != LastProcessedFrame)
{
LastProcessedFrame = CurrentFrame;
DoOncePerFrameWork();
} Tags
Version History
Introduced in: unknown
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?