UAssetManager::ChangeBundleStateForMatchingPrimaryAssets

Changes the bundle state of all loaded primary assets.

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 > ChangeBundleStateForMatchingPrimaryAssets
(
    const TArray< FName > & NewBundles,
    const TArray< FName > & OldBundles,
    FStreamableDelegate DelegateToCall,
    TAsyncLoadPriority Priority
)

Remarks

Changes the bundle state of all loaded primary assets. Only assets matching OldBundles will be modified 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

NewBundles

New bundle state for the assets that are changed

OldBundles

Old bundle state, it will remove these bundles and replace with NewBundles

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