UAssetManager::PreloadPrimaryAssets

Preloads data for a set of assets in a specific bundle state, and returns a handle you must keep active.

Choose your operating system:

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 > PreloadPrimaryAssets
(
    const TArray< FPrimaryAssetId > & AssetsToLoad,
    const TArray< FName > & LoadBundles,
    bool bLoadRecursive,
    FStreamableDelegate DelegateToCall,
    TAsyncLoadPriority Priority
)

Remarks

Preloads data for a set of assets in a specific bundle state, and returns a handle you must keep active. These assets are not officially Loaded, so Unload/ChangeBundleState will not affect them and if you release the handle without otherwise loading the assets they will be freed.

Returns

Streamable Handle that must be stored to keep the preloaded assets from being freed

Parameters

Parameter

Description

AssetsToLoad

List of primary assets to load

LoadBundles

List of bundles to load for those assets

bLoadRecursive

If true, this will call RecursivelyExpandBundleData and recurse into sub bundles of other primary assets loaded by a bundle reference

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