Stat Scope Inheritance Limits in Unreal Engine Async Tasks
0 reputation · 08 Sept 2020, 09:06 UTC
Developers rely on Unreal Engine’s Stat system to instrument code with custom cycle counters and identify performance hotspots before optimization. The goal is to obtain consistent, frame‑aggregated timing data for a custom stat scope regardless of whether the code runs on the game thread or inside an AsyncTask.
However, stat scopes created inside asynchronous tasks do not automatically inherit the parent thread’s stat group, which can cause the counter to appear missing or be attributed to a different group unless the thread’s stat group is set manually with SET_STATGROUP. This behavior raises questions about version consistency and the need for explicit group propagation in all asynchronous execution contexts.
Does the inheritance behavior differ between Engine 5.2 and 5.3? Is a manual SET_STATGROUP required for every AsyncTask, or are there engine‑provided mechanisms to propagate stat‑group context to child threads? Are there any documented settings or console variables that enable automatic inheritance for async workloads?