Asset Manager

Asset Manager

Thanks to Ramius LoadPrimaryAssets returns the stream handle for that polling but also results in the AM having a strong ref to everything loaded by that request. PreloadPrimaryAssets returns the stream handle, but doesn’t do the AM stronger so you have to keep things loaded by keeping the handle or hard references alive. If someone else has a stream handle for the same files, their handle will keep the files loaded even if you release yours.

Primary Data Asset

Example on why and how to use: https://www.tomlooman.com/unreal-engine-asset-manager-async-loading/

Incorrect Primary Asset Type?

If you create the PDA instances in the project, then implement GetPrimaryAssetId, you need to resave the PDAs.

Filtering PDAs using tags

Thanks to Snaps

  • On PDA
    • Override GetAssetRegistryTags(Context)
    • Add tag to Context
  • When searching:
FAssetRegistryModule& AssetRegistryModule = FModulemanager::LoadModuleChecked<FAssetRegistryModule>("AssetRegistry");
AssetRegistryModule.Get().GetAssetsByTagValues(Tags, OutArray);

Asset Bundles

See Asset Bundles section here To include nested asset bundles see IncludeAssetBundles