UBlueprintPathsLibrary::ValidatePath
#include "Kismet/BlueprintPathsLibrary.h"
Access: public
Specifiers: staticBlueprintPure
Description
Checks each component of InPath for characters the operating system disallows in filenames, reporting success and a failure reason via output parameters.
Caveats & Gotchas
- • This checks operating-system filesystem validity only — it uses a different rule set to FPackageName's asset path validation, so a path can pass here and still be an invalid Unreal package name.
- • Both outputs are reference parameters rather than a return value; in Blueprint this appears as two output pins off a single exec node.
- • OutReason is only meaningful when bDidSucceed is false — it isn't cleared or set to anything specific on success.
Signature
static ENGINE_API void ValidatePath(const FString& InPath, bool& bDidSucceed, FText& OutReason); Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| InPath | const FString& | Path to validate. | — |
| bDidSucceed | bool& | Receives true if every component of InPath is valid, false otherwise. | — |
| OutReason | FText& | Receives a human-readable failure reason when bDidSucceed is false. | — |
Return Type
void Example
Validate a path before writing to it C++
bool bDidSucceed = false;
FText Reason;
UBlueprintPathsLibrary::ValidatePath(TEXT("Saved/Exports/My:File.json"), bDidSucceed, Reason);
if (!bDidSucceed)
{
UE_LOG(LogTemp, Warning, TEXT("Invalid path: %s"), *Reason.ToString());
} Tags
Version History
Introduced in: unknown
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?