RealDocs

UAssetManager::AcquireResourcesForAssetList

function Engine Since unknown
#include "Engine/AssetManager.h"
Access: public Specifiers: virtual

Description

Acquires the platform chunks required to install the given assets, then invokes CompleteDelegate. An overload taking a plain FAssetManagerAcquireResourceDelegate (success bool only) is also available for callers that don't need the missing-chunk list.

Caveats & Gotchas

  • This only acquires/installs chunks — it does not load the assets. Follow up with a normal Load call once the delegate reports success.
  • If any requested chunk fails to acquire, the whole operation is considered a failure and CompleteDelegate's bSuccess is false, even if most chunks installed correctly.

Signature

virtual void AcquireResourcesForAssetList(const TArray<FSoftObjectPath>& AssetList, FAssetManagerAcquireResourceDelegateEx CompleteDelegate, EChunkPriority::Type Priority = EChunkPriority::Immediate);

Parameters

Name Type Description Default
AssetList const TArray<FSoftObjectPath>& Asset paths to acquire chunk resources for.
CompleteDelegate FAssetManagerAcquireResourceDelegateEx Called with success flag and the list of chunks that failed to acquire, if any.
Priority EChunkPriority::Type Priority to use when acquiring chunks through the platform chunk layer. EChunkPriority::Immediate

Return Type

void

Example

Acquire chunks before loading DLC content C++
UAssetManager& Manager = UAssetManager::Get();
Manager.AcquireResourcesForAssetList(AssetList, FAssetManagerAcquireResourceDelegateEx::CreateLambda(
	[](bool bSuccess, const TArray<int32>& MissingChunks)
	{
		if (bSuccess)
		{
			// Safe to load AssetList now
		}
	}), EChunkPriority::High);

Version History

Introduced in: unknown

Version Status Notes
5.6 stable

Feedback

Was this helpful?

Suggest an edit

Select a field above to begin editing.