RealDocs

UKismetSystemLibrary::GetPlatformUserDir

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

Description

Returns the current OS user's home/profile directory, as reported by the platform layer. Distinct from the project's saved or user directory used for game data.

Caveats & Gotchas

  • This is the OS-level user directory (e.g. the user's home folder), not FPaths::ProjectSavedDir() or FPlatformProcess::UserDir() used for save games — don't use it to build save file paths.
  • The returned path format and meaning varies by platform; on consoles it may return an empty string or a sandboxed path rather than a real user directory.

Signature

static FString GetPlatformUserDir()

Return Type

FString

Example

Log the platform user directory C++
FString UserDir = UKismetSystemLibrary::GetPlatformUserDir();
UE_LOG(LogTemp, Log, TEXT("Platform user dir: %s"), *UserDir);

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.