RealDocs

UKismetSystemLibrary::GetPlatformUserName

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

Description

Gets the current user name from the operating system.

Caveats & Gotchas

  • This is the OS account name, not the player's in-game display name or a platform online-service username (e.g. not a Steam/PSN/Xbox Live gamertag).
  • Can reveal personally identifiable information — avoid sending it to telemetry/analytics without user consent.
  • On consoles this typically returns a generic or empty string rather than a meaningful OS user name.

Signature

static FString GetPlatformUserName()

Return Type

FString

Example

Prefill a local save name field C++
FString OSUserName = UKismetSystemLibrary::GetPlatformUserName();

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.