Skip to main content

Helpers

AsyncLoad Toolkit includes convenience functions that combine loading with a common follow-up action, handling the weak-pointer safety automatically.

Spawn Actor Async

Load an Actor class from a soft class reference and spawn it when ready.

Category: AsyncKit | Spawn

PinTypeDescription
World Context ObjectUObject*Auto-filled
Actor ClassTSoftClassPtr<AActor>Soft reference to the actor class
TransformFTransformSpawn location / rotation / scale
On SpawnedFAsyncKitLoadedSingleReceives the spawned AActor* cast to UObject*
On FailedFAsyncKitFailedFires if loading or spawning fails
ParamsFAsyncKitLoadParamsOptions
ReturnUAsyncKitHandle*Handle
Spawn Actor Async
Actor Class ──▶ MyEnemySoftClass
Transform ──▶ Spawn Point Transform
On Spawned ──▶ [Create Event] → Cast to MyEnemy → Initialize
note

If the world is destroyed or invalid by the time loading completes (e.g., during a level transition), the spawn is skipped silently.


Set Static Mesh Async

Load a StaticMesh from a soft reference and assign it to a UStaticMeshComponent when ready.

Category: AsyncKit | Apply

PinTypeDescription
ComponentUStaticMeshComponent*Target component
MeshTSoftObjectPtr<UStaticMesh>Soft reference to the mesh
On FailedFAsyncKitFailedFires on load failure
ParamsFAsyncKitLoadParamsOptions
ReturnUAsyncKitHandle*Handle

If the component's owner is destroyed before loading completes, the assignment is silently skipped (weak pointer check).

Set Static Mesh Async
Component ──▶ My Mesh Component
Mesh ──▶ My Soft Mesh Ref

Typical use: for-each loop over a list of actors, asynchronously assigning a different mesh to each one without blocking the game thread.


Set Material Async

Load a MaterialInterface from a soft reference and assign it to a component slot when ready.

Category: AsyncKit | Apply

PinTypeDescription
ComponentUPrimitiveComponent*Target component (any primitive)
Element Indexint32Material slot index
MaterialTSoftObjectPtr<UMaterialInterface>Soft reference to the material
On FailedFAsyncKitFailedFires on load failure
ParamsFAsyncKitLoadParamsOptions
ReturnUAsyncKitHandle*Handle

Query functions

These pure functions check the in-memory state without triggering any load:

FunctionReturnsDescription
Is Asset LoadedboolTrue if the asset is currently in memory
Get If LoadedUObject*The object if in memory, null otherwise
Are All LoadedboolTrue if every asset in the array is in memory

Debug functions

FunctionReturnsDescription
Get Active Request Countint32Number of requests currently in flight
Get In Flight AssetsTArray<FString>Debug labels for all in-flight requests

Use these with a Print String in a tick event to monitor load activity, or connect them to an on-screen debug widget.

You can also toggle the in-game overlay from the console:

AsyncLoadToolkit.Debug 1    ← show overlay
AsyncLoadToolkit.Debug 0 ← hide overlay
AsyncLoadToolkit.DumpRetained