UKismetSystemLibrary::K2_IsValidTimerHandle
#include "Kismet/KismetSystemLibrary.h"
Access: public
Specifiers: staticUFUNCTIONBlueprintPure
Description
Checks whether an FTimerHandle has ever been assigned by a Set Timer node, as opposed to being a freshly declared, never-used variable.
Caveats & Gotchas
- • Validity only means the handle was once initialized by a Set Timer call — it does not mean the timer it points to is still running. A completed or cleared timer still leaves the handle 'valid' unless it was explicitly invalidated.
- • Use Does Timer Exist by Handle if you need to know whether the timer is still active in the timer manager, not just whether the handle variable was ever set.
Signature
static bool K2_IsValidTimerHandle(FTimerHandle Handle); Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| Handle | FTimerHandle | The timer handle to check for validity. | — |
Return Type
bool Example
Guard before clearing a stored handle (Blueprint) Blueprint
Event graph: branch on 'Is Valid Timer Handle' for a stored MyTimerHandle variable before calling 'Clear and Invalidate Timer by Handle', avoiding a wasted call on an uninitialized handle from a struct's default state. Tags
Version History
Introduced in: 4.24
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?