UAssetManager
#include "Engine/AssetManager.h" Description
The engine singleton that manages primary asset discovery, async loading, bundle state, and chunked DLC. Subclass it in Project Settings to add game-specific asset management logic.
Signature
class UAssetManager : public UObject Caveats & Gotchas
- • Call UAssetManager::GetIfInitialized() instead of Get() if you need to check if it's been set up — Get() was deprecated in UE 5.3.
- • Primary assets must be registered in the Asset Manager settings (Project Settings → Asset Manager) or in your custom UAssetManager subclass.
- • LoadPrimaryAsset is async by default — the callback fires on the next tick or later. Do not use the result immediately after the call without checking handle validity.
- • Bundles are the recommended way to manage what gets loaded for a given game state (e.g. only load combat art when in combat).
Example
Async load a primary asset C++
FPrimaryAssetId AssetId(TEXT("WeaponData"), TEXT("Sword_01"));
TArray<FName> Bundles;
UAssetManager::GetIfInitialized()->LoadPrimaryAsset(
AssetId,
Bundles,
FStreamableDelegate::CreateUObject(this, &AMyClass::OnWeaponLoaded)
); See Also
Tags
Version History
Introduced in: 4.17
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?