RealDocs

UKismetSystemLibrary::GetPrimaryAssetIdList

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

Description

Returns every registered Primary Asset Id belonging to a given Primary Asset Type. Useful for enumerating all assets of a category, such as every registered character or item.

Caveats & Gotchas

  • Only returns assets the Asset Manager has already scanned — call this after startup scanning has completed, or entries may be missing.
  • The output array is cleared and overwritten each call; it is not appended to.

Signature

static void GetPrimaryAssetIdList(FPrimaryAssetType PrimaryAssetType, TArray<FPrimaryAssetId>& OutPrimaryAssetIdList)

Parameters

Name Type Description Default
PrimaryAssetType FPrimaryAssetType The Primary Asset Type to enumerate, e.g. "Character" or "Item".
OutPrimaryAssetIdList TArray<FPrimaryAssetId>& Filled with every Primary Asset Id registered under the given type.

Return Type

void

Example

Enumerate all registered items C++
TArray<FPrimaryAssetId> ItemIds;
UKismetSystemLibrary::GetPrimaryAssetIdList(FPrimaryAssetType(TEXT("Item")), ItemIds);
for (const FPrimaryAssetId& Id : ItemIds)
{
	UE_LOG(LogTemp, Log, TEXT("Item: %s"), *Id.ToString());
}

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.