RealDocs

UBlueprintPathsLibrary::GameSourceDir

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

Description

Returns the directory where the current project's C++ source code files are kept.

Caveats & Gotchas

  • For Blueprint-only projects this directory may not exist at all, since there is no Source folder to generate.
  • Not present in packaged builds — this is a development/editor-time path only.

Signature

static FString GameSourceDir()

Return Type

FString

Example

Locate the project source tree C++
const FString SourceDir = UBlueprintPathsLibrary::GameSourceDir();
UE_LOG(LogTemp, Log, TEXT("Project source dir: %s"), *SourceDir);

Version History

Introduced in: 4.0

Version Status Notes
5.6 stable

Feedback

Was this helpful?

Suggest an edit

Select a field above to begin editing.