RealDocs

UKismetSystemLibrary::IsValidPrimaryAssetId

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

Description

Returns true if the Primary Asset Id is valid, meaning it has both a non-empty type and name.

Caveats & Gotchas

  • This only checks that the Id is well-formed (has type and name set), not that it corresponds to an asset the Asset Manager has actually scanned — a syntactically valid but unregistered Id still passes this check.

Signature

static bool IsValidPrimaryAssetId(FPrimaryAssetId PrimaryAssetId)

Parameters

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

Return Type

bool

Example

Guard before using a Primary Asset Id C++
if (UKismetSystemLibrary::IsValidPrimaryAssetId(AssetId))
{
	UObject* Loaded = UKismetSystemLibrary::GetObjectFromPrimaryAssetId(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.