RealDocs

UBlueprintPathsLibrary::SetProjectFilePath

function Engine Blueprint Since 4.20
#include "Kismet/BlueprintPathsLibrary.h"
Access: public Specifiers: staticUFUNCTIONBlueprintCallable

Description

Sets the path to the .uproject file used by FPaths for the rest of the process lifetime.

Caveats & Gotchas

  • This overrides engine-wide state (FPaths::SetProjectFilePath), so calling it at runtime affects every subsequent call to GetProjectFilePath / ProjectDir-style queries, not just the calling object.
  • Almost never needed in gameplay code — this exists for editor tooling and commandlets that need to redirect the engine to a different project on disk.

Signature

static void SetProjectFilePath(const FString& NewGameProjectFilePath)

Parameters

Name Type Description Default
NewGameProjectFilePath const FString& The project file path to set.

Return Type

void

Example

Override the project file path in an editor tool C++
UBlueprintPathsLibrary::SetProjectFilePath(TEXT("D:/Projects/OtherProject/OtherProject.uproject"));

Version History

Introduced in: 4.20

Version Status Notes
5.6 stable

Feedback

Was this helpful?

Suggest an edit

Select a field above to begin editing.