FGenericPlatformMisc::GetEnvironmentVariable

Retrieve a environment variable from the system

Windows
MacOS
Linux

Deprecated

  • void FPlatformMisc::GetEnvironmentVariable(Name, Result, Length) is deprecated. Use FString FPlatformMisc::GetEnvironmentVariable(Name) instead.

References

Module

Core

Header

/Engine/Source/Runtime/Core/Public/GenericPlatform/GenericPlatformMisc.h

Include

#include "GenericPlatform/GenericPlatformMisc.h"

Syntax

static void GetEnvironmentVariable
(
    const TCHAR * VariableName,
    TCHAR * Result,
    int32 ResultLength
)

Remarks

Retrieve a environment variable from the system

Parameters

Parameter

Description

VariableName

The name of the variable (ie "Path")

Result

The string to copy the value of the variable into

ResultLength

The size of the Result string

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss