RealDocs

UKismetSystemLibrary::GetPrimaryAssetIdFromSoftClassReference

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

Description

Returns the Primary Asset Id for a soft class reference. Works from the class path alone, so the class does not need to be loaded.

Caveats & Gotchas

  • Only resolves classes covered by a Primary Asset Type rule; unregistered class paths return an invalid Id rather than null.

Signature

static FPrimaryAssetId GetPrimaryAssetIdFromSoftClassReference(TSoftClassPtr<UObject> SoftClassReference)

Parameters

Name Type Description Default
SoftClassReference TSoftClassPtr<UObject> The soft class reference to look up, does not need to be loaded.

Return Type

FPrimaryAssetId

Example

Resolve an Id from a soft class reference C++
TSoftClassPtr<AActor> SoftClass(FSoftObjectPath(TEXT("/Game/Items/BP_Sword.BP_Sword_C")));
FPrimaryAssetId AssetId = UKismetSystemLibrary::GetPrimaryAssetIdFromSoftClassReference(SoftClass);

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.