UAssetManager::NormalizePackagePath
#include "Engine/AssetManager.h"
Access: public
Specifiers: static
Description
Normalizes a package path for use in the Asset Manager, removing duplicate slashes and adding or stripping a final trailing slash as requested.
Caveats & Gotchas
- • Modifies InOutPath in place rather than returning a new string — use GetNormalizedPackagePath instead if you want a pure function that returns the result.
- • Only handles slash normalization; it does not validate that the path is a well-formed content path or that it exists.
Signature
static void NormalizePackagePath(FString& InOutPath, bool bIncludeFinalSlash) Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| InOutPath | FString& | Path to normalize in place. | — |
| bIncludeFinalSlash | bool | If true, ensures a trailing slash is present; if false, ensures it's removed. | — |
Return Type
void Example
Normalize a path with a trailing slash C++
FString Path = TEXT("/Game//Items");
UAssetManager::NormalizePackagePath(Path, true);
// Path == TEXT("/Game/Items/") Tags
Version History
Introduced in: 4.22
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?