ue-actor-component-arc…
Use when writing or debugging AActor and UActorComponent C++: constructor vs BeginPlay, PostInitializeComponents, EndPlay…
Use when offloading work off the game thread, dispatching results back to it, running data-parallel loops, or scheduling timers and tickers in UE C++. Also use when the user mentions 'UE::Tasks::Launch', 'FPipe', 'FTaskEvent', 'AsyncTask', 'Async()', 'TFuture', 'TPromise',
Claude Code
$ npx -y skills add quodsoler/unreal-engine-skills --skill ue-async-threading --agent claude-code
Codex
$ npx skills add quodsoler/unreal-engine-skills --skill ue-async-threading -a codex -y
Cursor
$ npx skills add quodsoler/unreal-engine-skills --skill ue-async-threading -a cursor -y
Gemini CLI
$ npx skills add quodsoler/unreal-engine-skills --skill ue-async-threading -a gemini-cli -y
GitHub Copilot
$ npx skills add quodsoler/unreal-engine-skills --skill ue-async-threading -a github-copilot -y
OpenCode
$ npx skills add quodsoler/unreal-engine-skills --skill ue-async-threading -a opencode -y
Windsurf
$ npx skills add quodsoler/unreal-engine-skills --skill ue-async-threading -a windsurf -y
name: ue-async-threading description: "Use when offloading work off the game thread, dispatching results back to it, running data-parallel loops, or scheduling timers and tickers in UE C++. Also use when the user mentions 'UE::Tasks::Launch', 'FPipe', 'FTaskEvent', 'AsyncTask', 'Async()', 'TFuture', 'TPromise', 'ParallelFor', 'FRunnable', 'FAsyncTask', 'FCriticalSection', 'FRWLock', 'UE::FMutex', 'TMpscQueue', 'IsInGameThread', 'FTSTicker', 'SetTimer', 'thread safety'. For async asset loading, see ue-data-assets-tables; for smart pointers and GC lifetime, see ue-cpp-foundations." metadata: version: "2.0.0" engine: "5.8"
Target engine: **UE 5.8**. APIs below are verified against the 5.8 headers; older forms are listed under "Deprecated — do not use".
This skill covers moving work off the game thread and bringing results back: the `UE::Tasks` system (`Tasks/Task.h`, `Tasks/Pipe.h`), `Async`/`TFuture` (`Async/Async.h`, `Async/Future.h`), thread-pool `FAsyncTask` (`Async/AsyncWork.h`), `ParallelFor`, dedicated `FRunnable` threads, locks and lock-free queues, `FTSTicker` and `FTimerManager`. Everything except timers is in the `Core` module; `FTimerManager` is in `Engine`; `ENQUEUE_RENDER_COMMAND` is in `RenderCore`. Build.cs: `PublicDependencyModuleNames.AddRange(new string[] { "Core", "CoreUObject", "Engine" });` and add `"RenderCore"` only when enqueuing render commands.
Read `.agents/ue-project-context.md` if it exists (module names, conventions, enabled plugins, GAS/networking setup). Do not stop if it is missing.
Identify the area from the request and the codebase. Ask only when two plausible readings would produce different code.
| Request is about… | Go to | |---|---| | Which API fits | [Pattern Selection](#pattern-selection) | | One-shot background work, chaining, prerequisites, events | [UE::Tasks](#uetasks) | | Serializing access to a resource without a dedicated thread | [FPipe and FTaskConcurrencyLimiter](#fpipe-and-ftaskconcurrencylimiter) | | Futures, promises, dispatch to the game thread | [Async, TFuture and AsyncTask](#async-tfuture-and-asynctask) | | Reusable pooled work unit | [FAsyncTask and FAutoDeleteAsyncTask](#fasynctask-and-fautodeleteasynctask) | | Data-parallel loops | [ParallelFor](#parallelfor) | | Long-lived dedicated thread | [FRunnable and FRunnableThread](#frunnable-and-frunnablethread) | | Locks, events, atomics, queues, shared pointers | [Synchronization](#synchronization) | | Per-frame callbacks and delayed calls | [Tickers and Timers](#tickers-and-timers) | | UObject, GC and render-thread rules | [Thread Safety Rules](#thread-safety-rules) | | Old forms | [Deprecated — do not use](#deprecated--do-not-use) |
| Thread | Check | Owns | |---|---|---| | Game thread | `IsInGameThread()` (`CoreGlobals.h`) | All UObject access, Blueprint, gameplay, timers, tickers | | Render thread | `IsInRenderingThread()` | Scene proxies, render commands (`ENQUEUE_RENDER_COMMAND`) | | RHI thread | `IsInRHIThread()` | GPU command submission | | Worker threads | none | `UE::Tasks` scheduler, TaskGraph `AnyThread`, `ParallelFor` | | Thread pools | none | `GThreadPool`, `GBackgroundPriorityThreadPool`, `GIOThreadPool`; `GLargeThreadPool` only `WITH_EDITOR` (`Misc/QueuedThreadPool.h`) |
Golden rule: UObjects are game-thread-only. Compute off-thread on plain data, then apply results on the game thread through a `TWeakObjectPtr` (see [Thread Safety Rules](#thread-safety-rules)).
| Need | Use | Result | |---|---|---| | One-shot background work, dependencies, chaining | `UE::Tasks::Launch` | `TTask<T>` | | Run a lambda on the game thread from anywhere | `AsyncTask(ENamedThreads::GameThread, ...)` | none | | Future-style result with execution-context choice | `Async(EAsyncExecution, ...)` | `TFuture<T>` | | Serialize tasks touching one resource (FIFO) | `UE::Tasks::FPipe` | `TTask<T>` | | Cap how many tasks run at once | `UE::Tasks::FTaskConcurrencyLimiter` | none | | Reusable pooled work unit with owner-managed lifetime | `FAsyncTask<T>` / `FAutoDeleteAsyncTask<T>` | via `GetTask()` | | Data-parallel loop, caller blocks | `ParallelFor` | none | | Long-lived thread (socket, file watcher, sim loop) | `FRunnable` + `FRunnableThread::Create` | manual | | Per-frame callback outside an Actor tick | `FTSTicker::GetCoreTicker().AddTicker` | handle | | Delayed or repeating call on the game thread | `FTimerManager::SetTimer` | `FTimerHandle` |
#include "Tasks/Task.h"
// Tasks/Task.h:299
template<typename TaskBodyType>
UE::Tasks::TTask<TInvokeResult_T<TaskBodyType>> Launch(const TCHAR* DebugName, TaskBodyType&& TaskBody,
ETaskPriority Priority = ETaskPriority::Normal,
EExtendedTaskPriority ExtendedPriority = EExtendedTaskPriority::None,
ETaskFlags Flags = ETaskFlags::None);
// Tasks/Task.h:324 — same, with a prerequisites collection as the third parameter
template<typename TaskBodyType, typename PrerequisitesCollectionType>
UE::Tasks::TTask<TInvokeResult_T<TaskBodyType>> Launch(const TCHAR* DebugName, TaskBodyType&& TaskBody,
PrerequisitesCollectionType&& Prerequisites,
ETaskPriority Priority = ETaskPriority::Normal,
EExtendedTaskPriority ExtendedPriority = EExtendedTaskPriority::None,
ETaskFlags Flags = ETaskFlags::None);using namespace UE::Tasks;
TArray<int32> Data;
TTask<int32> Sum = Launch(UE_SOURCE_LOCATION, [Data]() { return ComputeSum(Data); });
// Prerequisites: TaskB runs after TaskA completes. Handles are copyable; GetResult() is non-const.
TTask<FVector> TaskA = Launch(UE_SOURCE_LOCATION, []() { return FVector(1.f, 2.f, 3.f); });
TTask<void> TaskB = Launch(UE_SOURCE_LOCATION,
[TaskA]() mutable { const FVector Pos = TaskA.GetResult(); ConsumePosition(Pos); },
Prerequisites(TaskA), ETaskPriority::BackgroundNormal);
// Manual gate: nothing after the event starts until Trigger()
FTaskEvent Gate{ UE_SOURCE_LOCATION };
TTaA collection of 31 AI agent skills for Unreal Engine C++ development. Built for game developers who want AI coding agents to help write correct, production-quality UE5 C++ code.
Use when writing or debugging AActor and UActorComponent C++: constructor vs BeginPlay, PostInitializeComponents, EndPlay…
Use when writing Unreal Engine C++ AI — AI controllers, behavior tree nodes, blackboards, AI perception, navmesh pathfinding, EQS…
Use when writing or debugging Unreal Engine animation C++: AnimInstance subclasses, thread-safe update, FAnimInstanceProxy,…
Use when playing, mixing or debugging sound in Unreal Engine — one-shot SFX, looping ambience, music, dialogue or procedural…
Use when exposing C++ to Blueprint or calling Blueprint from C++: UFUNCTION(BlueprintCallable), BlueprintPure,…
Use when writing or debugging UCharacterMovementComponent code: custom movement modes, floor detection, jumping, crouching, root…
Behavioral guidelines to reduce common LLM coding mistakes. Use when writing, reviewing, or refactoring code to avoid…
Design and build AI agents for any domain. Use when users: (1) ask to "create an agent", "build an assistant", or "design an AI…