CToolAsync

Overview

Async and timing utilities for background tasks, delayed execution, progressive animations, and condition-based triggers.

Functions

Name Description
doAsync Execute a lambda on a background thread.
doAfterDelay Execute a lambda after a delay in seconds. Has overloads with/without FTimerHandle, for AActor* or UWorld*.
doProgressively Execute a lambda progressively along a float curve (timeline). Has overloads with UCurveFloat* or inline curve points.
doForever Execute a lambda every tick or at interval. Returns UCdryxTickable* to stop later. Auto-stops on actor destroyed.
doAsSoonAs Execute a lambda as soon as a condition becomes true. Auto-stops.
// Background thread
doAsync([]() { /* heavy work */ });

// Delay (simple)
doAfterDelay(this, []() { /* after 2 sec */ }, 2.0f);

// Delay with handle (allows cancellation)
FTimerHandle handle;
doAfterDelay(this, []() { /* after 2 sec */ }, 2.0f, handle);

// Progressive animation with inline curve (0->1 over 1 second)
doProgressively(this, [](float alpha) { /* alpha goes 0 to 1 */ }, []() { /* done */ });

// Progressive animation with custom curve
doProgressively(this, myCurveFloat, [](float val) { /* val follows curve */ }, []() { /* done */ });

// Tick forever at 0.5s interval
UCdryxTickable* t = doForever(this, [](UCdryxTickable* tick, float delta) {
    // called every 0.5s
}, 0.5f);
t->stop(); // when done

// Condition trigger
doAsSoonAs(this, [this]() { return bReady; }, [this]() { StartGame(); });

Classes

Name Description
UCdryxTickable Tickable UObject registered in UCSingletonManager. Supports tick interval, start/stop, auto-stop on actor destroyed.
UCdryxTimeline Extends UCdryxTickable. Drives a FTimeline with a UCurveFloat for progressive animations.
CdryxASync FNonAbandonableTask for background thread execution.