UAssetManager::AddDynamicAsset
#include "Engine/AssetManager.h"
Access: public
Specifiers: virtual
Description
Registers a runtime-only primary asset that has no on-disk FAssetData, giving it a path and bundle state anyway. Creates the primary asset type if it doesn't already exist.
Caveats & Gotchas
- • Dynamic assets have no FAssetData, so they won't show up in editor asset registry queries or content browser searches — only AssetManager-specific lookups (GetPrimaryAssetObject, GetPrimaryAssetPath, etc.) will find them.
- • AssetPath is optional; if left invalid the asset can still carry bundle state but has nothing to actually load.
- • Calling this again with the same PrimaryAssetId updates the existing entry rather than erroring.
Signature
virtual bool AddDynamicAsset(const FPrimaryAssetId& PrimaryAssetId, const FSoftObjectPath& AssetPath, const FAssetBundleData& BundleData); Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| PrimaryAssetId | const FPrimaryAssetId& | Type/name of the dynamic asset; the type is created if it doesn't already exist. | — |
| AssetPath | const FSoftObjectPath& | Path to the object representing this asset; optional for dynamic assets. | — |
| BundleData | const FAssetBundleData& | Name-to-asset-path bundle states available for this asset. | — |
Return Type
bool Example
Registering a procedurally generated asset C++
FAssetBundleData BundleData;
bool bAdded = UAssetManager::Get().AddDynamicAsset(
FPrimaryAssetId("DynamicItem", "GeneratedSword"),
FSoftObjectPath(),
BundleData); Tags
Version History
Introduced in: unknown
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?