Asset Management
- UE handles asset loading automatically; Asset Manager for precise control of discovery, loading, audit. Unique global object in Editor and packaged games; can be overridden; divide content into chunks; audit disk and memory.
- Primary Assets manipulated directly via FPrimaryAssetId (GetPrimaryAssetId); Secondary Assets loaded automatically when referenced by Primary. By default only UWorld (levels) are Primary. ID = Primary Asset Type + name.
- Blueprint class primary assets (GetPrimaryAssetObjectClass; "Class" functions) vs non-Blueprint (Data Assets; instances; simpler, more memory-efficient; cannot inherit). UPrimaryDataAsset; MyShape:BP_MySquare example.
- Asset Manager singleton; Streamable Managers do actual async loading and keep objects in memory via Streamable Handles; multiple Streamable Managers exist.
- Asset Bundles: named list of assets associated with a Primary Asset; meta=(AssetBundles="TestBundle") on TSoftObjectPtr; or runtime FAssetBundleData via UpdateAssetBundleData / AddDynamicAsset.
- Register: AssetManagerClassName in DefaultEngine.ini [/Script/Engine.Engine]; Project Settings Asset Manager: Primary Asset Types to Scan, Directories to Exclude, Primary Asset Rules, Only Cook Production Assets, redirects; or StartInitialLoading + ScanPathsForPrimaryAssets (same type in one subfolder).
- Load: LoadPrimaryAssets/LoadPrimaryAsset/LoadPrimaryAssetsWithType with bundles; Unload*. Dynamic: ExtractSoftObjectPaths, RecursivelyExpandBundleData.