UKismetSystemLibrary::MakeTopLevelAssetPath
#include "Kismet/KismetSystemLibrary.h"
Access: public
Specifiers: staticBlueprintPureBlueprintThreadSafeBlueprintAutocast
Description
Builds an FTopLevelAssetPath from either a single full path string or a separate package name and asset name. FTopLevelAssetPath is the lightweight, name-based identifier used by asset registry and class-lookup APIs.
Caveats & Gotchas
- • If AssetName is empty, PackageName is parsed as a full "/Path/Package.Asset" string; if AssetName is non-empty, PackageName is treated as just the package portion.
- • Unlike FSoftObjectPath, FTopLevelAssetPath has no sub-object path support — it can only reference top-level assets, not nested objects within a package.
- • No validation is performed here; passing a malformed string produces an FTopLevelAssetPath that will simply fail to resolve later.
Signature
static ENGINE_API FTopLevelAssetPath MakeTopLevelAssetPath(UPARAM(DisplayName="FullPathOrPackageName") const FString& PackageName, const FString& AssetName) Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| PackageName | const FString& | Either the full package path (e.g. /Game/MyAsset.MyAsset) or just the package name if AssetName is also supplied. | — |
| AssetName | const FString& | The asset name within the package. Can be empty if PackageName already contains the full path. | — |
Return Type
FTopLevelAssetPath Example
Build a path from a full string C++
FTopLevelAssetPath Path = UKismetSystemLibrary::MakeTopLevelAssetPath(TEXT("/Game/Blueprints/BP_Enemy.BP_Enemy_C"), TEXT("")); See Also
Tags
Version History
Introduced in: unknown
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?