UKismetSystemLibrary::IsValidPrimaryAssetType
#include "Kismet/KismetSystemLibrary.h"
Access: public
Specifiers: staticUFUNCTIONBlueprintPureBlueprintThreadSafe
Description
Returns true if the Primary Asset Type is valid, meaning it has a non-empty name.
Caveats & Gotchas
- • Only checks that the type name is non-empty, not that it matches a Primary Asset Type actually configured in Project Settings > Asset Manager.
Signature
static bool IsValidPrimaryAssetType(FPrimaryAssetType PrimaryAssetType) Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| PrimaryAssetType | FPrimaryAssetType | The Primary Asset Type to check. | — |
Return Type
bool Example
Guard a Primary Asset Type before use C++
FPrimaryAssetType ItemType(TEXT("Item"));
if (UKismetSystemLibrary::IsValidPrimaryAssetType(ItemType))
{
TArray<FPrimaryAssetId> Ids;
UKismetSystemLibrary::GetPrimaryAssetIdList(ItemType, Ids);
} Version History
Introduced in: unknown
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?