UBlueprintPathsLibrary::IsProjectFilePathSet
#include "Kismet/BlueprintPathsLibrary.h"
Access: public
Specifiers: staticUFUNCTIONBlueprintPure
Description
Checks whether the path to the .uproject file is currently set. Useful before calling GetProjectFilePath to avoid working with an empty string.
Caveats & Gotchas
- • In a packaged, cooked build the project file path is often not set since there is no .uproject on disk in the same way — check the return value rather than assuming it is always true.
- • This reflects FPaths::IsProjectFilePathSet() internally, which is set once during engine startup and does not change afterward.
Signature
static bool IsProjectFilePathSet() Return Type
bool Example
Guard before reading the project file 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?