UGantryAsyncAction_LoadTracked
The Blueprint nodes Load Assets Tracked and Load Primary Assets Tracked: async loads a loading screen can see.
Each node runs its load inside a named, tagged load scope, so the game's loading screen can show "Loading the arena (37/120)" instead of a spinner. Give the node a Display Name such as "Loading the arena". To group several loads under one heading, pass a scope from Begin Load Scope, or a stage's Load Scope, to the Parent Scope pin.
- On Completed fires once everything requested has loaded, with the objects in the order asked for. An entry is empty where a path did not resolve.
- On Cancelled fires instead if the load is cancelled.
Exactly one of the two fires. Assets already in memory complete at once.
Loaded objects stay in memory only while something references them, so store them in a variable to keep them. Primary assets stay loaded through the asset manager until unloaded there.
Load Assets Tracked is tracked whatever the project's asset manager is. Load Primary Assets Tracked needs UGantryAssetManager as the project's asset manager to be tracked; without it, it still loads, untracked, and logs a warning saying so.
In C++, call UGantryAssetManager::RequestAsyncLoadTracked or PreloadPrimaryAssetsTracked.
- Inherits
UBlueprintAsyncActionBase
Properties
| Property | Type | Default | Description |
|---|---|---|---|
OnCompleted | FGantryOnAssetsLoaded | () | Fired once everything has loaded, with the objects in request order. |
OnCancelled | FGantryOnAssetsLoaded | () | Fired instead of On Completed when the load is cancelled. The array is empty. |
Functions
LoadAssetsTracked
Loads assets asynchronously inside a named load scope.
| Pin | Type | Direction | Description |
|---|---|---|---|
WorldContextObject | UObject* | in | Any object in the world the load belongs to; keeps the node alive. |
Assets | TArray<TSoftObjectPtr<UObject> > | in | What to load. |
DisplayName | FString | in | What a loading bar should call this. |
ReasonTag | FGameplayTag | in | Kind of work. Empty means Gantry.Load.Scope.Content. |
bUserFacing = true | bool | in | Whether a loading bar counts it. |
ParentScope = () | FGantryHandle | in | Optional scope to nest inside, such as a stage's Load Scope. |
| Return Value | UGantryAsyncAction_LoadTracked* | out | The async action; Blueprint wires its pins. |
LoadPrimaryAssetsTracked
Loads primary assets and their bundles asynchronously inside a named, user-facing load scope.
They stay loaded through the asset manager until unloaded there.
| Pin | Type | Direction | Description |
|---|---|---|---|
WorldContextObject | UObject* | in | Any object in the world the load belongs to; keeps the node alive. |
PrimaryAssets | TArray<FPrimaryAssetId> | in | What to load. |
Bundles | TArray<FName> | in | Asset bundles to load with them, e.g. "Game" or "Client". |
DisplayName | FString | in | What a loading bar should call this. |
ReasonTag | FGameplayTag | in | Kind of work. Empty means Gantry.Load.Scope.Content. |
ParentScope = () | FGantryHandle | in | Optional scope to nest inside, such as a stage's Load Scope. |
| Return Value | UGantryAsyncAction_LoadTracked* | out | The async action; Blueprint wires its pins. |
C++
Public C++ members that Blueprint does not see.
Activate
virtual void
Starts the load.