UAssetManager::ChangeBundleStateForMatchingPrimaryAssets
#include "Engine/AssetManager.h"
Access: public
Specifiers: virtual
Description
Changes bundle state across every currently loaded primary asset that has the given OldBundles, replacing them with NewBundles — useful for global state changes like switching level-of-detail or platform bundle sets.
Caveats & Gotchas
- • Applies globally to every loaded primary asset matching OldBundles rather than a specific list — an unexpectedly broad set of assets can be affected if OldBundles is common across many asset types.
- • Assets that don't currently have any of OldBundles applied are left untouched, so this cannot be used to add a brand-new bundle to assets with no matching old bundle.
Signature
virtual TSharedPtr<FStreamableHandle> ChangeBundleStateForMatchingPrimaryAssets(
const TArray<FName>& NewBundles,
const TArray<FName>& OldBundles,
FStreamableDelegate DelegateToCall = FStreamableDelegate(),
TAsyncLoadPriority Priority = FStreamableManager::DefaultAsyncLoadPriority,
UE::FSourceLocation Location = UE::FSourceLocation::Current()); Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| NewBundles | const TArray<FName>& | New bundle state for the assets that are changed. | — |
| OldBundles | const TArray<FName>& | Old bundle state; matching bundles are removed and replaced with NewBundles. | — |
| DelegateToCall | FStreamableDelegate | Delegate invoked on completion. | FStreamableDelegate() |
| Priority | TAsyncLoadPriority | Async loading priority for the request. | FStreamableManager::DefaultAsyncLoadPriority |
| Location | UE::FSourceLocation | Call-site source location captured for streaming diagnostics; not meant to be passed explicitly. | UE::FSourceLocation::Current() |
Return Type
TSharedPtr<FStreamableHandle> Example
Swapping a bundle across all loaded assets C++
UAssetManager::Get().ChangeBundleStateForMatchingPrimaryAssets(
{ FName("LOD_Low") },
{ FName("LOD_High") }); Tags
Version History
Introduced in: unknown
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?