RealDocs

FTimerManager::GetStatId

function Engine Since 4.0
#include "TimerManager.h"
Access: public Specifiers: ENGINE_API

Description

Returns the stat ID used to identify this timer manager in the Unreal Insights / stats profiler. Satisfies the FTickableGameObject interface requirement.

Caveats & Gotchas

  • The returned TStatId is only valid when stats are compiled in (i.e. non-Shipping builds by default). In Shipping, TStatId is a zero-size type and comparisons against it are meaningless.
  • Do not cache the TStatId across frames — the underlying stat registration can theoretically change if modules are hot-reloaded in editor.

Signature

ENGINE_API TStatId GetStatId() const

Return Type

TStatId

Example

Implementing FTickableGameObject on a custom manager C++
// Pattern used by FTimerManager itself; useful when building your own tickable singleton.
DECLARE_CYCLE_STAT(TEXT("MyManager Tick"), STAT_MyManagerTick, STATGROUP_Game);

TStatId UMyManager::GetStatId() const
{
    RETURN_QUICK_DECLARE_CYCLE_STAT(UMyManager, STATGROUP_Game);
}

Version History

Introduced in: 4.0

Version Status Notes
5.6 stable

Feedback

Was this helpful?

Suggest an edit

Select a field above to begin editing.