RealDocs

UKismetSystemLibrary::GetClassFromPrimaryAssetId

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

Description

Returns the Blueprint class associated with a Primary Asset Id. Only returns a valid class if it is already loaded into memory; this does not trigger a load.

Caveats & Gotchas

  • Returns null if the class asset has not been loaded yet — use the Asset Manager's async load functions first if you need a guaranteed result.
  • Only useful for Primary Asset Ids that point at a class asset (e.g. a Blueprint class registered as a Primary Asset); for regular object assets use GetObjectFromPrimaryAssetId instead.

Signature

static TSubclassOf<UObject> GetClassFromPrimaryAssetId(FPrimaryAssetId PrimaryAssetId)

Parameters

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

Return Type

TSubclassOf<UObject>

Example

Resolve a loaded class C++
FPrimaryAssetId AssetId(FName("Character"), FName("Hero_Warrior"));
TSubclassOf<UObject> WarriorClass = UKismetSystemLibrary::GetClassFromPrimaryAssetId(AssetId);
if (WarriorClass)
{
	UE_LOG(LogTemp, Log, TEXT("Resolved class: %s"), *WarriorClass->GetName());
}

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.