UAssetManager::LoadPrimaryAssets

Loads a list of Primary Assets.

Windows
MacOS
Linux

References

Module

Engine

Header

/Engine/Source/Runtime/Engine/Classes/Engine/AssetManager.h

Include

#include "Engine/AssetManager.h"

Source

/Engine/Source/Runtime/Engine/Private/AssetManager.cpp

Syntax

virtual TSharedPtr< FStreamableHandle > LoadPrimaryAssets
(
    const TArray< FPrimaryAssetId > & AssetsToLoad,
    const TArray< FName > & LoadBundles,
    FStreamableDelegate DelegateToCall,
    TAsyncLoadPriority Priority
)

Remarks

Loads a list of Primary Assets. This will start an async load of those assets, calling callback on completion. These assets will stay in memory until explicitly unloaded. You can wait on the returned streamable request or poll as needed. If there is no work to do, returned handle will be null and delegate will get called before function returns.

Returns

Streamable Handle that can be used to poll or wait. You do not need to keep this handle to stop the assets from being unloaded

Parameters

Parameter

Description

AssetsToLoad

List of primary assets to load

LoadBundles

List of bundles to load for those assets

DelegateToCall

Delegate that will be called on completion, may be called before function returns if assets are already loaded

Priority

Async loading priority for this request

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss