RealDocs

UKismetSystemLibrary::UnloadPrimaryAsset

function Engine Blueprint Since unknown
#include "Kismet/KismetSystemLibrary.h"
Access: public Specifiers: staticUFUNCTIONBlueprintCallable

Description

Unloads a Primary Asset, allowing it to be garbage collected once nothing else references it.

Caveats & Gotchas

  • Does not force an immediate garbage collect or guarantee the object is destroyed — it only releases the Asset Manager's hard reference; anything else holding a strong reference keeps it alive.
  • Calling this on an asset loaded via multiple overlapping LoadPrimaryAsset requests only removes this caller's hold; the Asset Manager reference-counts loads internally.

Signature

static void UnloadPrimaryAsset(FPrimaryAssetId PrimaryAssetId)

Parameters

Name Type Description Default
PrimaryAssetId FPrimaryAssetId The Primary Asset Id to unload.

Return Type

void

Example

Release a no-longer-needed asset C++
UKismetSystemLibrary::UnloadPrimaryAsset(AssetId);

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.