RealDocs

UAssetManager::UnloadPrimaryAsset

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

Description

Single-asset convenience wrapper around UnloadPrimaryAssets for releasing one previously loaded primary asset.

Caveats & Gotchas

  • Same reference-counting caveat as UnloadPrimaryAssets: other strong references elsewhere in the project will keep the asset resident even after this call.
  • Calling this for an asset that was never loaded via the asset manager (or already unloaded) is harmless and simply returns 0.

Signature

virtual int32 UnloadPrimaryAsset(const FPrimaryAssetId& AssetToUnload);

Parameters

Name Type Description Default
AssetToUnload const FPrimaryAssetId& The single primary asset that was previously loaded and should now be released.

Return Type

int32

Example

Release a single loaded item C++
UAssetManager::Get().UnloadPrimaryAsset(FPrimaryAssetId(TEXT("Item"), TEXT("Sword")));

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.