UBlueprintPathsLibrary::NormalizeFilename
#include "Kismet/BlueprintPathsLibrary.h"
Access: public
Specifiers: staticUFUNCTIONBlueprintPure
Description
Converts every '/' and '\' character in the path to '/', producing Unreal's canonical slash convention.
Caveats & Gotchas
- • The result is returned via the OutPath output parameter, not the return value — in Blueprint this shows up as a second output pin, and in C++ it means the function has no meaningful return type.
- • This only fixes slash direction; it does not collapse duplicate slashes or resolve ".." segments — use RemoveDuplicateSlashes and CollapseRelativeDirectories for that, or MakeStandardFilename to do all three.
Signature
static void NormalizeFilename(const FString& InPath, FString& OutPath) Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| InPath | const FString& | The path to normalize. | — |
| OutPath | FString& | Receives the normalized path with all separators converted to forward slashes. | — |
Return Type
void Example
Normalize a Windows-style path C++
FString Normalized;
UBlueprintPathsLibrary::NormalizeFilename(TEXT("Content\\Textures\\Rock.png"), Normalized);
// Normalized == TEXT("Content/Textures/Rock.png") See Also
Tags
Version History
Introduced in: 4.20
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?