UKismetAnimationLibrary::K2_StartProfilingTimer
#include "KismetAnimationLibrary.h"
Access: public
Specifiers: staticUFUNCTIONBlueprintCallable
Description
Starts a timer for measuring how long a section of an animation Blueprint graph takes to execute. Pair with K2_EndProfilingTimer to read the elapsed time.
Caveats & Gotchas
- • Uses a single shared timer internally, so nesting two Start/End pairs on the same thread overwrites the first timer's start point rather than stacking.
- • Intended for ad-hoc profiling in the animation Blueprint editor; it has no effect on shipped performance since the timer itself is cheap but tells you nothing unless paired with logging via K2_EndProfilingTimer.
Signature
static void K2_StartProfilingTimer() Return Type
void Example
Bracket a section of an anim graph C++
UKismetAnimationLibrary::K2_StartProfilingTimer();
// ... expensive animation logic here ...
float ElapsedMs = UKismetAnimationLibrary::K2_EndProfilingTimer(true, TEXT("MyAnimSection: ")); Tags
Version History
Introduced in: 4.20
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?