UBlueprintPathsLibrary::GetProjectFilePath
#include "Kismet/BlueprintPathsLibrary.h"
Access: public
Specifiers: staticUFUNCTIONBlueprintPure
Description
Gets the path to the .uproject file for the running project.
Caveats & Gotchas
- • Returns an empty string if the project file path has never been set — check IsProjectFilePathSet() first rather than assuming a non-empty result.
- • The returned path may be relative to the working directory rather than absolute, depending on how the engine was launched.
Signature
static FString GetProjectFilePath() Return Type
FString Example
Read the .uproject path C++
if (UBlueprintPathsLibrary::IsProjectFilePathSet())
{
FString ProjectFile = UBlueprintPathsLibrary::GetProjectFilePath();
UE_LOG(LogTemp, Log, TEXT("Project file: %s"), *ProjectFile);
} Tags
Version History
Introduced in: 4.20
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?