RealDocs

UBlueprintPathsLibrary::GetRelativePathToRoot

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

Description

Returns the relative path needed to get from the current base directory (Engine/Binaries/<Platform>) up to the engine root directory.

Caveats & Gotchas

  • Returns a reference to an internal cached string — treat the returned value as read-only and don't assume its lifetime extends past the next engine path change.
  • This is an engine-internal path-resolution helper; most gameplay and tooling code should use RootDir() or ProjectDir() instead of reconstructing paths from this.
  • The value depends on where the executable's Binaries folder sits relative to the engine root, so it differs between installed builds, source builds, and packaged games.

Signature

static ENGINE_API const FString& GetRelativePathToRoot();

Return Type

const FString&

Example

Inspect the relative root path C++
const FString& RelativeRoot = UBlueprintPathsLibrary::GetRelativePathToRoot();
UE_LOG(LogTemp, Log, TEXT("%s"), *RelativeRoot);

Version History

Introduced in: unknown

Version Status Notes
5.6 stable

Feedback

Was this helpful?

Suggest an edit

Select a field above to begin editing.