UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
FGenericPlatformMisc Struct Reference

#include <GenericPlatformMisc.h>

+ Inheritance diagram for FGenericPlatformMisc:

Classes

struct  FStaticData
 

Public Member Functions

 UE_DEPRECATED (4.18, "FPaths::SetOverrideGameDir() has been superseded by FPaths::SetOverrideProjectDir().") static FORCEINLINE void SetOverrideGameDir(const FString &InOverrideDir)
 

Static Public Member Functions

static CORE_API void PlatformPreInit ()
 
static void PlatformInit ()
 
static CORE_API FDelegateHandle AddNetworkListener (FOnNetworkConnectionChangedDelegate &&InNewDelegate)
 
static CORE_API bool RemoveNetworkListener (FDelegateHandle Handle)
 
static void PlatformHandleSplashScreen (bool ShowSplashScreen=false)
 
static void PlatformTearDown ()
 
static void SetGracefulTerminationHandler ()
 
static void SetCrashHandler (void(*CrashHandler)(const FGenericCrashContext &Context))
 
static ECrashHandlingType GetCrashHandlingType ()
 
static ECrashHandlingType SetCrashHandlingType (ECrashHandlingType Type)
 
static CORE_API FString GetEnvironmentVariable (const TCHAR *VariableName)
 
static CORE_API void SetEnvironmentVar (const TCHAR *VariableName, const TCHAR *Value)
 
static FORCEINLINE int32 GetMaxPathLength ()
 
static CORE_API int32 GetExternalAppMaxPathLength ()
 
static CORE_API const TCHARGetPathVarDelimiter ()
 
static CORE_API TArray< uint8GetMacAddress ()
 
static CORE_API FString GetMacAddressString ()
 
static CORE_API FString GetHashedMacAddressString ()
 
static CORE_API FString GetDeviceId ()
 
static CORE_API FString GetUniqueAdvertisingId ()
 
static CORE_API void SubmitErrorReport (const TCHAR *InErrorHist, EErrorReportMode::Type InMode)
 
static bool IsRemoteSession ()
 
static FORCEINLINE bool IsDebuggerPresent ()
 
static CORE_API EProcessDiagnosticFlags GetProcessDiagnostics ()
 
static FORCEINLINE void DebugBreak ()
 
static CORE_API FString GetCPUVendor ()
 
static CORE_API uint32 GetCPUInfo ()
 
static CORE_API bool HasNonoptionalCPUFeatures ()
 
static CORE_API bool NeedsNonoptionalCPUFeaturesCheck ()
 
static CORE_API FString GetHostArchitecture ()
 
static CORE_API FString GetCPUBrand ()
 
static CORE_API uint32 GetCPUModelID ()
 
static CORE_API uint32 GetCPUMicrocodeRevision ()
 
static CORE_API FString GetCPUChipset ()
 
static CORE_API FString GetPrimaryGPUBrand ()
 
static CORE_API FString GetDeviceMakeAndModel ()
 
static CORE_API struct FGPUDriverInfo GetGPUDriverInfo (const FString &DeviceDescription)
 
static CORE_API void GetOSVersions (FString &out_OSVersionLabel, FString &out_OSSubVersionLabel)
 
static CORE_API FString GetOSVersion ()
 
static CORE_API bool GetDiskTotalAndFreeSpace (const FString &InPath, uint64 &TotalNumberOfBytes, uint64 &NumberOfFreeBytes)
 
static bool GetPageFaultStats (FPageFaultStats &OutStats, EPageFaultFlags Flags=EPageFaultFlags::All)
 
static bool GetBlockingIOStats (FProcessIOStats &OutStats, EInputOutputFlags Flags=EInputOutputFlags::All)
 
static bool GetContextSwitchStats (FContextSwitchStats &OutStats, EContextSwitchFlags Flags=EContextSwitchFlags::All)
 
static bool SupportsMessaging ()
 
static bool IsCacheStorageAvailable ()
 
static bool SupportsLocalCaching ()
 
static bool AllowLocalCaching ()
 
static bool SupportsFullCrashDumps ()
 
CORE_API static FORCENOINLINE void MemoryBarrier ()
 
static void SetMemoryWarningHandler (void(*Handler)(const FGenericMemoryWarningContext &Context))
 
static bool HasMemoryWarningHandler ()
 
static FORCEINLINE uint32 GetLastError ()
 
static void SetLastError (uint32 ErrorCode)
 
static CORE_API void RaiseException (uint32 ExceptionCode)
 
static FORCEINLINE void BeginNamedEventFrame ()
 
static FORCEINLINE void BeginNamedEvent (const struct FColor &Color, const TCHAR *Text)
 
static FORCEINLINE void BeginNamedEvent (const struct FColor &Color, const ANSICHAR *Text)
 
static FORCEINLINE void EndNamedEvent ()
 
static FORCEINLINE void CustomNamedStat (const TCHAR *Text, float Value, const TCHAR *Graph, const TCHAR *Unit)
 
static FORCEINLINE void CustomNamedStat (const ANSICHAR *Text, float Value, const ANSICHAR *Graph, const ANSICHAR *Unit)
 
template<typename CharType >
static void StatNamedEvent (const CharType *Text)
 
static CORE_API void TickStatNamedEvents ()
 
static CORE_API void LogNameEventStatsInit ()
 
static void BeginEnterBackgroundEvent (const TCHAR *Text)
 
static void EndEnterBackgroundEvent ()
 
static FORCEINLINE void InitTaggedStorage (uint32 NumTags)
 
static FORCEINLINE void ShutdownTaggedStorage ()
 
static FORCEINLINE void TagBuffer (const char *Label, uint32 Category, const void *Buffer, size_t BufferSize)
 
static CORE_API bool SetStoredValues (const FString &InStoreId, const FString &InSectionName, const TMap< FString, FString > &InKeyValues)
 
static CORE_API bool SetStoredValue (const FString &InStoreId, const FString &InSectionName, const FString &InKeyName, const FString &InValue)
 
static CORE_API bool GetStoredValue (const FString &InStoreId, const FString &InSectionName, const FString &InKeyName, FString &OutValue)
 
static CORE_API bool DeleteStoredValue (const FString &InStoreId, const FString &InSectionName, const FString &InKeyName)
 
static CORE_API bool DeleteStoredSection (const FString &InStoreId, const FString &InSectionName)
 
static CORE_API void LowLevelOutputDebugString (const TCHAR *Message)
 
static CORE_API void VARARGS LowLevelOutputDebugStringf (const TCHAR *Format,...)
 
static CORE_API bool IsLowLevelOutputDebugStringStructured ()
 
static CORE_API void SetUTF8Output ()
 
static CORE_API void LocalPrint (const TCHAR *Str)
 
static bool IsLocalPrintThreadSafe ()
 
static CORE_API bool HasSeparateChannelForDebugOutput ()
 
static CORE_API void RequestExit (bool Force, const TCHAR *CallSite=nullptr)
 
static CORE_API void RequestExitWithStatus (bool Force, uint8 ReturnCode, const TCHAR *CallSite=nullptr)
 
static CORE_API bool RestartApplication ()
 
static CORE_API bool RestartApplicationWithCmdLine (const char *CmdLine)
 
static CORE_API const TCHARGetSystemErrorMessage (TCHAR *OutBuffer, int32 BufferCount, int32 Error)
 
static CORE_API void CreateGuid (struct FGuid &Result)
 
static CORE_API EAppReturnType::Type MessageBoxExt (EAppMsgType::Type MsgType, const TCHAR *Text, const TCHAR *Caption)
 
static bool CommandLineCommands ()
 
static FORCEINLINE bool Is64bitOperatingSystem ()
 
static bool IsValidAbsolutePathFormat (const FString &Path)
 
static void NormalizePath (FString &InPath)
 
static void NormalizePath (FStringBuilderBase &InPath)
 
static CORE_API const TCHARGetDefaultPathSeparator ()
 
static CORE_API bool UseRenderThread ()
 
static bool AllowAudioThread ()
 
static CORE_API bool AllowThreadHeartBeat ()
 
static CORE_API int32 NumberOfCores ()
 
static CORE_API const FProcessorGroupDescGetProcessorGroupDesc ()
 
static CORE_API int32 NumberOfCoresIncludingHyperthreads ()
 
static CORE_API int32 NumberOfWorkerThreadsToSpawn ()
 
static CORE_API int32 NumberOfIOWorkerThreadsToSpawn ()
 
static struct FAsyncIOSystemBaseGetPlatformSpecificAsyncIOSystem ()
 
static const TCHARGetPlatformFeaturesModuleName ()
 
static CORE_API const TCHARRootDir ()
 
static CORE_API TArray< FString > GetAdditionalRootDirectories ()
 
static CORE_API void AddAdditionalRootDirectory (const FString &RootDir)
 
static CORE_API const TCHAREngineDir ()
 
static CORE_API const TCHARLaunchDir ()
 
static CORE_API void CacheLaunchDir ()
 
static CORE_API const TCHARProjectDir ()
 
static CORE_API bool GetEngineAndProjectAbsoluteDirsFromExecutable (FString &OutProjectDir, FString &OutEngineDir)
 
static CORE_API FString CloudDir ()
 
static bool HasProjectPersistentDownloadDir ()
 
static CORE_API bool CheckPersistentDownloadStorageSpaceAvailable (uint64 BytesRequired, bool bAttemptToUseUI)
 
static CORE_API const TCHARGamePersistentDownloadDir ()
 
static CORE_API const TCHARGameTemporaryDownloadDir ()
 
static CORE_API const TCHARGeneratedConfigDir ()
 
static CORE_API const TCHARGetUBTPlatform ()
 
static CORE_API const TCHARGetUBTTarget ()
 
static CORE_API const TCHARGetUBTArchitecture ()
 
static CORE_API void SetUBTTargetName (const TCHAR *InTargetName)
 
static CORE_API const TCHARGetUBTTargetName ()
 
static CORE_API const TCHARGetNullRHIShaderFormat ()
 
static CORE_API IPlatformChunkInstallGetPlatformChunkInstall ()
 
static CORE_API IPlatformCompressionGetPlatformCompression ()
 
static CORE_API IPlatformHostCommunicationGetPlatformHostCommunication ()
 
static bool OsExecute (const TCHAR *CommandType, const TCHAR *Command, const TCHAR *CommandLine=NULL)
 
static bool IsPackagedForDistribution ()
 
static CORE_API bool GetSHA256Signature (const void *Data, uint32 ByteSize, FSHA256Signature &OutSignature)
 
static CORE_API FString GetDefaultLanguage ()
 
static CORE_API FString GetDefaultLocale ()
 
static CORE_API FString GetTimeZoneId ()
 
static bool Exec (class UWorld *InWorld, const TCHAR *Cmd, FOutputDevice &Out)
 
static CORE_API FText GetFileManagerName ()
 
static bool SupportsMultithreadedFileHandles ()
 
static void SetShouldPromptForRemoteDebugging (bool bInShouldPrompt)
 
static void SetShouldPromptForRemoteDebugOnEnsure (bool bInShouldPrompt)
 
static bool IsEnsureAllowed ()
 
static void UpdateHotfixableEnsureSettings ()
 
static CORE_API void TickHotfixables ()
 
static void PromptForRemoteDebugging (bool bIsEnsure)
 
static FORCEINLINE void Prefetch (const void *Ptr)
 
static FORCEINLINE void Prefetch (const void *Ptr, int32 Offset)
 
static FORCEINLINE void PrefetchBlock (const void *Ptr)
 
static FORCEINLINE void PrefetchBlock (const void *Ptr, int32 NumBytes)
 
static CORE_API const TCHARGetDefaultDeviceProfileName ()
 
static FORCEINLINE int GetBatteryLevel ()
 
static FORCEINLINE void SetBrightness (float bBright)
 
static FORCEINLINE float GetBrightness ()
 
static FORCEINLINE bool SupportsBrightness ()
 
static FORCEINLINE bool IsInLowPowerMode ()
 
static CORE_API float GetDeviceTemperatureLevel ()
 
static CORE_API void SetOverrideProjectDir (const FString &InOverrideDir)
 
static CORE_API void GetValidTargetPlatforms (TArray< FString > &TargetPlatformNames)
 
static CORE_API FPlatformUserId GetPlatformUserForUserIndex (int32 LocalUserIndex)
 
static CORE_API int32 GetUserIndexForPlatformUser (FPlatformUserId PlatformUser)
 
static bool GetUseVirtualJoysticks ()
 
static bool SupportsTouchInput ()
 
static bool SupportsForceTouchInput ()
 
static bool ShouldDisplayTouchInterfaceOnFakingTouchEvents ()
 
static bool DesktopTouchScreen ()
 
static bool FullscreenSameAsWindowedFullscreen ()
 
static bool GetVolumeButtonsHandledBySystem ()
 
static void SetVolumeButtonsHandledBySystem (bool enabled)
 
static CORE_API TArray< uint8GetSystemFontBytes ()
 
static bool HasActiveWiFiConnection ()
 
static CORE_API ENetworkConnectionStatus GetNetworkConnectionStatus ()
 
static CORE_API void SetNetworkConnectionStatus (ENetworkConnectionStatus NewNetworkConnectionStatus)
 
static ENetworkConnectionType GetNetworkConnectionType ()
 
static void EnsureNetworkIfNecessary ()
 
static bool HasVariableHardware ()
 
static bool HasPlatformFeature (const TCHAR *FeatureName)
 
static CORE_API bool IsRunningOnBattery ()
 
static CORE_API EDeviceScreenOrientation GetDeviceOrientation ()
 
static CORE_API void SetDeviceOrientation (EDeviceScreenOrientation NewDeviceOrientation)
 
static CORE_API EDeviceScreenOrientation GetAllowedDeviceOrientation ()
 
static CORE_API void SetAllowedDeviceOrientation (EDeviceScreenOrientation NewAllowedDeviceOrientation)
 
static CORE_API int32 GetDeviceVolume ()
 
static CORE_API FGuid GetMachineId ()
 
static CORE_API FString GetLoginId ()
 
static CORE_API FString GetEpicAccountId ()
 
static CORE_API FString GetDeviceTag ()
 
static CORE_API FString GetOperatingSystemId ()
 
static CORE_API EConvertibleLaptopMode GetConvertibleLaptopMode ()
 
static CORE_API const TCHARGetEngineMode ()
 
static CORE_API TArray< FString > GetPreferredLanguages ()
 
static CORE_API FString GetLocalCurrencyCode ()
 
static CORE_API FString GetLocalCurrencySymbol ()
 
static CORE_API void RegisterForRemoteNotifications ()
 
static CORE_API bool IsRegisteredForRemoteNotifications ()
 
static CORE_API void UnregisterForRemoteNotifications ()
 
static CORE_API FString GetPendingActivationProtocol ()
 
static bool ShouldDisablePluginAtRuntime (const FString &PluginName)
 
static void PrepareMobileHaptics (EMobileHapticsType Type)
 
static void TriggerMobileHaptics ()
 
static void ReleaseMobileHaptics ()
 
static void ShareURL (const FString &URL, const FText &Description, int32 LocationHintX, int32 LocationHintY)
 
static bool SupportsDeviceCheckToken ()
 
static CORE_API bool RequestDeviceCheckToken (TFunction< void(const TArray< uint8 > &)> QuerySucceededFunc, TFunction< void(const FString &, const FString &)> QueryFailedFunc)
 
static CORE_API FString LoadTextFileFromPlatformPackage (const FString &RelativePath)
 
static CORE_API bool FileExistsInPlatformPackage (const FString &RelativePath)
 
static CORE_API void TearDown ()
 
static CORE_API void ParseChunkIdPakchunkIndexMapping (TArray< FString > ChunkIndexRedirects, TMap< int32, int32 > &OutMapping)
 
static void PumpMessagesOutsideMainLoop ()
 
static void PumpMessagesForSlowTask ()
 
static void PumpEssentialAppMessages ()
 
static void HidePlatformStartupScreen ()
 
static FORCEINLINE bool UseHDRByDefault ()
 
static FORCEINLINE void ChooseHDRDeviceAndColorGamut (uint32 DeviceId, uint32 DisplayNitLevel, EDisplayOutputFormat &OutputDevice, EDisplayColorGamut &ColorGamut)
 
static FORCEINLINE int32 GetChunkIDFromPakchunkIndex (int32 PakchunkIndex)
 
static CORE_API FStringView GetPakFilenamePrefix ()
 
static CORE_API int32 GetPakchunkIndexFromPakFile (FStringView InFilename)
 
static FORCEINLINE bool Expand16BitIndicesTo32BitOnLoad ()
 
static FORCEINLINE void GetNetworkFileCustomData (TMap< FString, FString > &OutCustomPlatformData)
 
static FORCEINLINE bool SupportsBackbufferSampling ()
 
static int32 GetMaxRefreshRate ()
 
static int32 GetMaxSupportedRefreshRate ()
 
static int32 GetMaxSyncInterval ()
 
static CORE_API const FString * GetConfigRulesVariable (const FString &Key)
 
static CORE_API const class TMap< FString, FString > & GetConfigRuleVars ()
 
static CORE_API bool IsPGOEnabled ()
 
static CORE_API bool IsPGICapableBinary ()
 
static bool StartNewPGOCollection (const FString &AbsoluteFileName)
 
static CORE_API bool IsPGIActive ()
 
static CORE_API const FString VersionCheckPlatformName ()
 
static bool StopPGOCollectionAndCloseFile ()
 
static CORE_API void ShowConsoleWindow ()
 
static CORE_API int GetMobilePropagateAlphaSetting ()
 
static bool IsRunningInCloud ()
 
static bool WasLaunchedStreaming ()
 
static void DisableScreenTimeout ()
 
static void EnableScreenTimeout ()
 
static bool SetupSyscallFilters ()
 
static const float GetVirtualKeyboardInputHeight ()
 
static bool GetPlatformScreenWarnings (TArray< FText > &PlatformScreenWarnings)
 

Static Protected Member Functions

static CORE_API void GetConfiguredCoreLimits (int32 PlatformNumPhysicalCores, int32 PlatformNumLogicalCores, bool &bOutFullyInitialized, int32 &OutPhysicalCoreLimit, int32 &OutLogicalCoreLimit, bool &bOutSetPhysicalCountToLogicalCount)
 

Static Protected Attributes

static CORE_API bool bShouldPromptForRemoteDebugging = false
 
static CORE_API bool bPromptForRemoteDebugOnEnsure = false
 
static CORE_API EDeviceScreenOrientation AllowedDeviceOrientation = EDeviceScreenOrientation::Unknown
 
static CORE_API ENetworkConnectionStatus CurrentNetworkConnectionStatus = ENetworkConnectionStatus::Connected
 

Detailed Description

Generic implementation for most platforms

Member Function Documentation

◆ AddAdditionalRootDirectory()

void FGenericPlatformMisc::AddAdditionalRootDirectory ( const FString &  RootDir)
static

add an additional root directory

◆ AddNetworkListener()

FDelegateHandle FGenericPlatformMisc::AddNetworkListener ( FOnNetworkConnectionChangedDelegate &&  InNewDelegate)
static

◆ AllowAudioThread()

static bool FGenericPlatformMisc::AllowAudioThread ( )
inlinestatic

Checks if platform wants to allow an audio thread on current device (note: does not imply it will, only if okay given other criteria met)

Returns
true if allowed, false if shouldn't use a separate audio thread

◆ AllowLocalCaching()

static bool FGenericPlatformMisc::AllowLocalCaching ( )
inlinestatic

◆ AllowThreadHeartBeat()

bool FGenericPlatformMisc::AllowThreadHeartBeat ( )
static

Checks if platform wants to allow the thread heartbeat hang detection

Returns
true if allows, false if shouldn't allow thread heartbeat hang detection

◆ BeginEnterBackgroundEvent()

static void FGenericPlatformMisc::BeginEnterBackgroundEvent ( const TCHAR Text)
inlinestatic

Profiler enter background events. These are for timing backgrounding. Some platforms have a timeout for this

◆ BeginNamedEvent() [1/2]

static FORCEINLINE void FGenericPlatformMisc::BeginNamedEvent ( const struct FColor Color,
const ANSICHAR Text 
)
inlinestatic

◆ BeginNamedEvent() [2/2]

static FORCEINLINE void FGenericPlatformMisc::BeginNamedEvent ( const struct FColor Color,
const TCHAR Text 
)
inlinestatic

◆ BeginNamedEventFrame()

static FORCEINLINE void FGenericPlatformMisc::BeginNamedEventFrame ( )
inlinestatic

◆ CacheLaunchDir()

void FGenericPlatformMisc::CacheLaunchDir ( )
static

Function to store the current working directory for use with LaunchDir()

◆ CheckPersistentDownloadStorageSpaceAvailable()

static CORE_API bool FGenericPlatformMisc::CheckPersistentDownloadStorageSpaceAvailable ( uint64  BytesRequired,
bool  bAttemptToUseUI 
)
static

Ensure that there enough space in the persistent download dir. Returns true if there is sufficient space. If there is insufficient space and bAttemptToUseUI is true, the function will return false and the user may be prompted to clear space

◆ ChooseHDRDeviceAndColorGamut()

static FORCEINLINE void FGenericPlatformMisc::ChooseHDRDeviceAndColorGamut ( uint32  DeviceId,
uint32  DisplayNitLevel,
EDisplayOutputFormat OutputDevice,
EDisplayColorGamut ColorGamut 
)
inlinestatic

◆ CloudDir()

FString FGenericPlatformMisc::CloudDir ( )
static

Return the CloudDir. CloudDir can be per-user.

◆ CommandLineCommands()

static bool FGenericPlatformMisc::CommandLineCommands ( )
inlinestatic

Handles Game Explorer, Firewall and FirstInstall commands, typically from the installer

Returns
false if the game cannot continue.

◆ CreateGuid()

void FGenericPlatformMisc::CreateGuid ( struct FGuid Result)
static

Create a new globally unique identifier.

◆ CustomNamedStat() [1/2]

static FORCEINLINE void FGenericPlatformMisc::CustomNamedStat ( const ANSICHAR Text,
float  Value,
const ANSICHAR Graph,
const ANSICHAR Unit 
)
inlinestatic

◆ CustomNamedStat() [2/2]

static FORCEINLINE void FGenericPlatformMisc::CustomNamedStat ( const TCHAR Text,
float  Value,
const TCHAR Graph,
const TCHAR Unit 
)
inlinestatic

◆ DebugBreak()

static FORCEINLINE void FGenericPlatformMisc::DebugBreak ( )
inlinestatic

Break into the debugger, if IsDebuggerPresent returns true, otherwise do nothing

◆ DeleteStoredSection()

bool FGenericPlatformMisc::DeleteStoredSection ( const FString &  InStoreId,
const FString &  InSectionName 
)
static

Deletes the given section and its contained values in the platform specific key->value store Note: The key->value store is user-specific, but may be used to share data between different applications for the same user

Parameters
InStoreIdThe name used to identify the store you want to use (eg, MyGame)
InSectionNameThe section to delete.
Returns
bool true if the section was deleted, false if not found or couldn't delete

◆ DeleteStoredValue()

bool FGenericPlatformMisc::DeleteStoredValue ( const FString &  InStoreId,
const FString &  InSectionName,
const FString &  InKeyName 
)
static

Deletes value for the given section and key in the platform specific key->value store Note: The key->value store is user-specific, but may be used to share data between different applications for the same user

Parameters
InStoreIdThe name used to identify the store you want to use (eg, MyGame)
InSectionNameThe section that this key->value pair is placed within (can contain / separators, eg UserDetails/AccountInfo)
InKeyNameThe name of the key to set the value for
Returns
bool true if the value was deleted correctly, false if not found or couldn't delete

◆ DesktopTouchScreen()

static bool FGenericPlatformMisc::DesktopTouchScreen ( )
inlinestatic

◆ DisableScreenTimeout()

static void FGenericPlatformMisc::DisableScreenTimeout ( )
inlinestatic

◆ EnableScreenTimeout()

static void FGenericPlatformMisc::EnableScreenTimeout ( )
inlinestatic

◆ EndEnterBackgroundEvent()

static void FGenericPlatformMisc::EndEnterBackgroundEvent ( )
inlinestatic

◆ EndNamedEvent()

static FORCEINLINE void FGenericPlatformMisc::EndNamedEvent ( )
inlinestatic

◆ EngineDir()

const TCHAR * FGenericPlatformMisc::EngineDir ( )
static

Get the engine directory

◆ EnsureNetworkIfNecessary()

static void FGenericPlatformMisc::EnsureNetworkIfNecessary ( )
inlinestatic

◆ Exec()

static bool FGenericPlatformMisc::Exec ( class UWorld InWorld,
const TCHAR Cmd,
FOutputDevice Out 
)
inlinestatic

Platform-specific Exec function

Parameters
InWorldWorld context
CmdThe command to execute
OutThe output device to utilize
Returns
bool true if command was processed, false if not

◆ Expand16BitIndicesTo32BitOnLoad()

static FORCEINLINE bool FGenericPlatformMisc::Expand16BitIndicesTo32BitOnLoad ( )
inlinestatic

◆ FileExistsInPlatformPackage()

bool FGenericPlatformMisc::FileExistsInPlatformPackage ( const FString &  RelativePath)
static

◆ FullscreenSameAsWindowedFullscreen()

static bool FGenericPlatformMisc::FullscreenSameAsWindowedFullscreen ( )
inlinestatic

◆ GamePersistentDownloadDir()

const TCHAR * FGenericPlatformMisc::GamePersistentDownloadDir ( )
static

Return the GamePersistentDownloadDir. On some platforms, returns the writable directory for downloaded data that persists across play sessions. This dir is always per-game.

◆ GameTemporaryDownloadDir()

const TCHAR * FGenericPlatformMisc::GameTemporaryDownloadDir ( )
static

Return the temporary directory

◆ GeneratedConfigDir()

const TCHAR * FGenericPlatformMisc::GeneratedConfigDir ( )
static

◆ GetAdditionalRootDirectories()

TArray< FString > FGenericPlatformMisc::GetAdditionalRootDirectories ( )
static

get additional directories which can be considered as root directories

◆ GetAllowedDeviceOrientation()

EDeviceScreenOrientation FGenericPlatformMisc::GetAllowedDeviceOrientation ( )
static

Returns the allowed orientation of the device. This is NOT the same as GetDeviceOrientation, which only returns Portrait, LandscapeLeft, PortraitUpsideDown or LandscapeRight. The allowed orientation limits what orientation your device can have. So if you set the allowed orientation to LandscapeLeft, GetDeviceOrientation will only ever return LandscapeLeft. But if you set the allowed orientation to LandscapeSensor, you are actually restricting the allowed orientations to LandscapeLeft OR LandscapeRight (depending on the sensor), so GetDeviceOrientation might return LandscapeLeft OR LandscapeRight.

Returns
An EDeviceScreenOrientation value.

◆ GetBatteryLevel()

static FORCEINLINE int FGenericPlatformMisc::GetBatteryLevel ( )
inlinestatic

Gets the current battery level.

Returns
the battery level between 0 and 100.

◆ GetBlockingIOStats()

static bool FGenericPlatformMisc::GetBlockingIOStats ( FProcessIOStats OutStats,
EInputOutputFlags  Flags = EInputOutputFlags::All 
)
inlinestatic

Gets Blocking Input/Output stats covering the lifetime of the process

Parameters
OutStatsOutputs the IO stats
FlagsThe type of IO stats to retrieve
Returns
Whether or not stats were successfully retrieved

◆ GetBrightness()

static FORCEINLINE float FGenericPlatformMisc::GetBrightness ( )
inlinestatic

◆ GetChunkIDFromPakchunkIndex()

static FORCEINLINE int32 FGenericPlatformMisc::GetChunkIDFromPakchunkIndex ( int32  PakchunkIndex)
inlinestatic

◆ GetConfigRulesVariable()

const FString * FGenericPlatformMisc::GetConfigRulesVariable ( const FString &  Key)
static

◆ GetConfigRuleVars()

const TMap< FString, FString > & FGenericPlatformMisc::GetConfigRuleVars ( )
static

◆ GetConfiguredCoreLimits()

void FGenericPlatformMisc::GetConfiguredCoreLimits ( int32  PlatformNumPhysicalCores,
int32  PlatformNumLogicalCores,
bool bOutFullyInitialized,
int32 OutPhysicalCoreLimit,
int32 OutLogicalCoreLimit,
bool bOutSetPhysicalCountToLogicalCount 
)
staticprotected

Parse CoreLimit from CommandLine or from the SetCoreLimit value. The real number of physical cores and logical cores must be provided so that CommandLine arguments can be translated.

Parameters
bOutFullyInitializedTrue if commandline was available. If false, values are set to defaults.
OutPhysicalCoreLimitThe maximum number of physical cores to report in NumberOfCores. Non-negative. 0 indicates unlimited.
OutLogicalCoreLimitThe maximum number of logical cores to report in NumberOfCoresIncludingHyperthreads. Non-negative. 0 indicates unlimited.
bOutSetPhysicalCountToLogicalCountWhether NumberOfCores should be overridden to return NumberOfCoresIncludingHyperthreads.

◆ GetContextSwitchStats()

static bool FGenericPlatformMisc::GetContextSwitchStats ( FContextSwitchStats OutStats,
EContextSwitchFlags  Flags = EContextSwitchFlags::All 
)
inlinestatic

Gets Context Switch stats covering the lifetime of the process

Parameters
OutStatsOutputs the Context Switch stats
FlagsThe type of Context Switch stats to retrieve
Returns
Whether or not stats were successfully retrieved

◆ GetConvertibleLaptopMode()

EConvertibleLaptopMode FGenericPlatformMisc::GetConvertibleLaptopMode ( )
static

Gets the current mode of convertible laptops, i.e. Laptop or Tablet.

Returns
The laptop mode, or Unknown if not known, or NotSupported if not a convertible laptop.

◆ GetCPUBrand()

FString FGenericPlatformMisc::GetCPUBrand ( )
static

Uses cpuid instruction to get the CPU brand string

Returns
CPU brand string

◆ GetCPUChipset()

FString FGenericPlatformMisc::GetCPUChipset ( )
static

Returns the CPU chipset if known

Returns
CPU chipset string (or "Unknown")

◆ GetCPUInfo()

uint32 FGenericPlatformMisc::GetCPUInfo ( )
static

On x86(-64) platforms, uses cpuid instruction to get the CPU signature

Returns
CPU info bitfield
    Bits 0-3    Stepping ID
    Bits 4-7    Model
    Bits 8-11   Family
    Bits 12-13  Processor type (Intel) / Reserved (AMD)
    Bits 14-15  Reserved
    Bits 16-19  Extended model
    Bits 20-27  Extended family
    Bits 28-31  Reserved

◆ GetCPUMicrocodeRevision()

uint32 FGenericPlatformMisc::GetCPUMicrocodeRevision ( )
static

◆ GetCPUModelID()

uint32 FGenericPlatformMisc::GetCPUModelID ( )
static

◆ GetCPUVendor()

FString FGenericPlatformMisc::GetCPUVendor ( )
static

Uses cpuid instruction to get the vendor string

Returns
CPU vendor name

◆ GetCrashHandlingType()

static ECrashHandlingType FGenericPlatformMisc::GetCrashHandlingType ( )
inlinestatic

Gets the current crash handling type.

◆ GetDefaultDeviceProfileName()

const TCHAR * FGenericPlatformMisc::GetDefaultDeviceProfileName ( )
static

Gets the default profile name. Used if there is no device profile specified

Returns
the default profile name.

◆ GetDefaultLanguage()

FString FGenericPlatformMisc::GetDefaultLanguage ( )
static

Get the default language (for localization) used by this platform.

Note
This is typically the same as GetDefaultLocale unless the platform distinguishes between the two.
This should be returned in IETF language tag form:
  • A two-letter ISO 639-1 language code (eg, "zh").
  • An optional four-letter ISO 15924 script code (eg, "Hans").
  • An optional two-letter ISO 3166-1 country code (eg, "CN").

◆ GetDefaultLocale()

FString FGenericPlatformMisc::GetDefaultLocale ( )
static

Get the default locale (for internationalization) used by this platform.

Note
This should be returned in IETF language tag form:
  • A two-letter ISO 639-1 language code (eg, "zh").
  • An optional four-letter ISO 15924 script code (eg, "Hans").
  • An optional two-letter ISO 3166-1 country code (eg, "CN").

◆ GetDefaultPathSeparator()

const TCHAR * FGenericPlatformMisc::GetDefaultPathSeparator ( )
static
Returns
platform specific path separator.

◆ GetDeviceId()

FString FGenericPlatformMisc::GetDeviceId ( )
static

Returns a unique string for device identification. Differs from the deprecated GetUniqueDeviceId in that there is no default implementation (which used unreliable Mac address determiniation). This code is expected to use platform-specific methods to identify the device.

WARNING: Use of this method in your app may imply technical certification requirments for your platform! For instance, consoles often require cert waivers to be in place before calling APIs that can track a device, so be very careful that you are following your platform's protocols for accessing device IDs. See the platform- specific implementations of this method for details on what APIs are used.

If you do not have permission to call this on one or more of your platforms, set GET_DEVICE_ID_UNAVAILABLE=1 in your build step to ensure that any calls that may be made to this API will simply return an empty string.

Returns
the unique string generated by this platform for this device, or an empty string if one is not available.

◆ GetDeviceMakeAndModel()

FString FGenericPlatformMisc::GetDeviceMakeAndModel ( )
static
Returns
"DeviceMake|DeviceModel" if possible, and "CPUVendor|CPUBrand" otherwise, optionally returns "DeviceMake|DeviceModel|CPUChipset" if known

◆ GetDeviceOrientation()

EDeviceScreenOrientation FGenericPlatformMisc::GetDeviceOrientation ( )
static

Returns the current orientation of the device: will be either Portrait, LandscapeLeft, PortraitUpsideDown or LandscapeRight.

Returns
An EDeviceScreenOrientation value.

◆ GetDeviceTag()

FString FGenericPlatformMisc::GetDeviceTag ( )
static

Get Device Tag of the device running the session.

Note: Gets from DeviceTag command line argument

Returns
empty string or the value from DeviceTag argument.

◆ GetDeviceTemperatureLevel()

float FGenericPlatformMisc::GetDeviceTemperatureLevel ( )
static

Returns the current device temperature level. Level is a relative value that is platform dependent. Lower is cooler, higher is warmer. Level of -1 means Unimplemented.

◆ GetDeviceVolume()

int32 FGenericPlatformMisc::GetDeviceVolume ( )
static

Returns the device volume if the device is capable of returning that information. -1 : Unknown 0 : Muted 100 : Full Volume

◆ GetDiskTotalAndFreeSpace()

bool FGenericPlatformMisc::GetDiskTotalAndFreeSpace ( const FString &  InPath,
uint64 TotalNumberOfBytes,
uint64 NumberOfFreeBytes 
)
static

Retrieves information about the total number of bytes and number of free bytes for the specified disk path.

Note that on modern file systems the concept of "free space" is a bit more loosely defined than one might historically expect due to features like on-demand freeing of caches and automatic content deduplication. As a result, this function can be very slow (10s of ms), and the free space value should not be used for exact measurements.

◆ GetEngineAndProjectAbsoluteDirsFromExecutable()

bool FGenericPlatformMisc::GetEngineAndProjectAbsoluteDirsFromExecutable ( FString &  OutProjectDir,
FString &  OutEngineDir 
)
static

Return the engine and project directory based from the executable. This function would return different results than EngineDir and Project dir if for example -basedir is set on cmd line and/or pak files are used

◆ GetEngineMode()

const TCHAR * FGenericPlatformMisc::GetEngineMode ( )
static

Get a string description of the mode the engine was running in.

◆ GetEnvironmentVariable()

FString FGenericPlatformMisc::GetEnvironmentVariable ( const TCHAR VariableName)
static

Retrieve a environment variable from the system

Parameters
VariableNameThe name of the variable (ie "Path")
Returns
Value of the variable, or an empty string if not set.

◆ GetEpicAccountId()

FString FGenericPlatformMisc::GetEpicAccountId ( )
static

Get the Epic account ID for the user who last used the Launcher.

Note: This function is for Epic internal use only. Do not use.

Returns
an empty string if the account ID was not present or it failed to read it for any reason.

◆ GetExternalAppMaxPathLength()

int32 FGenericPlatformMisc::GetExternalAppMaxPathLength ( )
static

Returns the maximum length of a path which applies to all processes on the host platform. Since some platforms such as Windows make the maximum path length a per-process configuration, this function returns the least commmon limit that can be supported by all processes. Default implementation returns GetMaxPathLength().

◆ GetFileManagerName()

FText FGenericPlatformMisc::GetFileManagerName ( )
static
Returns
Get the name of the platform specific file manager (eg, Explorer on Windows, Finder on OS X)

◆ GetGPUDriverInfo()

FGPUDriverInfo FGenericPlatformMisc::GetGPUDriverInfo ( const FString &  DeviceDescription)
static

◆ GetHashedMacAddressString()

FString FGenericPlatformMisc::GetHashedMacAddressString ( )
static

Retrieve the Mac address of the current adapter as a hashed string (privacy). This generally relies on GetMacAddress() being implemented for the platform, if possible.

Returns
String representing the hashed Mac address, or empty string.

◆ GetHostArchitecture()

FString FGenericPlatformMisc::GetHostArchitecture ( )
static
Returns
architecture of the host machine (x64, arm64 etc)

◆ GetLastError()

static FORCEINLINE uint32 FGenericPlatformMisc::GetLastError ( )
inlinestatic

◆ GetLocalCurrencyCode()

FString FGenericPlatformMisc::GetLocalCurrencyCode ( )
static

Returns the currency code associated with the device's locale

Returns
the currency code associated with the device's locale

◆ GetLocalCurrencySymbol()

FString FGenericPlatformMisc::GetLocalCurrencySymbol ( )
static

Returns the currency symbol associated with the device's locale

Returns
the currency symbol associated with the device's locale

◆ GetLoginId()

FString FGenericPlatformMisc::GetLoginId ( )
static

Returns a unique string associated with the login account of the current machine. Implemented using persistent storage like the registry on window (using HKCU), so is susceptible to anything that could reset or revert that storage if the ID is created, which is generally during install or first run of the app.

Note: This is NOT a user or machine fingerprint, as multiple logins on the same machine will not share the same ID, and it is not based on the hardware of the user. It is completely random and non-identifiable.

Returns
a string containing the LoginID, or empty if not available.

◆ GetMacAddress()

TArray< uint8 > FGenericPlatformMisc::GetMacAddress ( )
static

Retrieve the Mac address of the current adapter. This is generally platform-dependent code that other platforms must implement.

Returns
array of bytes representing the Mac address, or empty array if unable to determine.

◆ GetMacAddressString()

FString FGenericPlatformMisc::GetMacAddressString ( )
static

Retrieve the Mac address of the current adapter as a string. This generally relies on GetMacAddress() being implemented for the platform, if possible.

Returns
String representing the Mac address, or empty string.

◆ GetMachineId()

FGuid FGenericPlatformMisc::GetMachineId ( )
static

Get (or create) the unique ID used to identify this computer. This is sort of a misnomer, as there will actually be one per user account on the operating system. This is NOT based on a machine fingerprint.

◆ GetMaxPathLength()

static FORCEINLINE int32 FGenericPlatformMisc::GetMaxPathLength ( )
inlinestatic

Returns the maximum length of a path. Note that some platforms such as Windows make this a per-process configuration.

◆ GetMaxRefreshRate()

static int32 FGenericPlatformMisc::GetMaxRefreshRate ( )
inlinestatic

retrieves the current maximum refresh rate supported by the platform

◆ GetMaxSupportedRefreshRate()

static int32 FGenericPlatformMisc::GetMaxSupportedRefreshRate ( )
inlinestatic

retrieves the maximum refresh rate supported by the platform

◆ GetMaxSyncInterval()

static int32 FGenericPlatformMisc::GetMaxSyncInterval ( )
inlinestatic

Returns the platform's maximum allowed value for rhi.SyncInterval

◆ GetMobilePropagateAlphaSetting()

int FGenericPlatformMisc::GetMobilePropagateAlphaSetting ( )
static

◆ GetNetworkConnectionStatus()

ENetworkConnectionStatus FGenericPlatformMisc::GetNetworkConnectionStatus ( )
static

Returns the current status for the network connection

◆ GetNetworkConnectionType()

static ENetworkConnectionType FGenericPlatformMisc::GetNetworkConnectionType ( )
inlinestatic

Returns whether WiFi connection is currently active

◆ GetNetworkFileCustomData()

static FORCEINLINE void FGenericPlatformMisc::GetNetworkFileCustomData ( TMap< FString, FString > &  OutCustomPlatformData)
inlinestatic

Returns any platform-specific key-value data that needs to be sent to the network file server

◆ GetNullRHIShaderFormat()

const TCHAR * FGenericPlatformMisc::GetNullRHIShaderFormat ( )
static

Determines the shader format for the platform

Returns
Returns the shader format to be used by that platform

◆ GetOperatingSystemId()

FString FGenericPlatformMisc::GetOperatingSystemId ( )
static

Gets a globally unique ID the represents a particular operating system install.

Returns
an opaque string representing the ID, or an empty string if the platform doesn't support one.

◆ GetOSVersion()

FString FGenericPlatformMisc::GetOSVersion ( )
static

Gets a string representing the numeric OS version (as opposed to a translated OS version that GetOSVersions returns). The returned string should try to be brief and avoid newlines and symbols, but there's technically no restriction on the string it can return. If the implementation does not support this, it should return an empty string.

◆ GetOSVersions()

void FGenericPlatformMisc::GetOSVersions ( FString &  out_OSVersionLabel,
FString &  out_OSSubVersionLabel 
)
static

Gets the OS Version and OS Subversion.

◆ GetPageFaultStats()

static bool FGenericPlatformMisc::GetPageFaultStats ( FPageFaultStats OutStats,
EPageFaultFlags  Flags = EPageFaultFlags::All 
)
inlinestatic

Gets Page Fault stats covering the lifetime of the process

Parameters
OutStatsOutputs the page fault stats
FlagsThe type of page fault stats to retrieve
Returns
Whether or not stats were successfully retrieved

◆ GetPakchunkIndexFromPakFile()

int32 FGenericPlatformMisc::GetPakchunkIndexFromPakFile ( FStringView  InFilename)
static

◆ GetPakFilenamePrefix()

FStringView FGenericPlatformMisc::GetPakFilenamePrefix ( )
static

◆ GetPathVarDelimiter()

const TCHAR * FGenericPlatformMisc::GetPathVarDelimiter ( )
static

return the delimiter between paths in the PATH environment variable.

◆ GetPendingActivationProtocol()

FString FGenericPlatformMisc::GetPendingActivationProtocol ( )
static

Returns activation protocol that's waiting to be broadcast

◆ GetPlatformChunkInstall()

IPlatformChunkInstall * FGenericPlatformMisc::GetPlatformChunkInstall ( )
static

Returns the platform specific chunk based install interface

Returns
Returns the platform specific chunk based install implementation

◆ GetPlatformCompression()

static CORE_API IPlatformCompression * FGenericPlatformMisc::GetPlatformCompression ( )
static

Returns the platform specific compression interface

Returns
Returns the platform specific compression interface

◆ GetPlatformFeaturesModuleName()

static const TCHAR * FGenericPlatformMisc::GetPlatformFeaturesModuleName ( )
inlinestatic

Return the name of the platform features module. Can be nullptr if there are no extra features for this platform

◆ GetPlatformHostCommunication()

IPlatformHostCommunication & FGenericPlatformMisc::GetPlatformHostCommunication ( )
static

Returns the platform specific interface for communication with processes running on the host pc.

Returns
Returns the platform specific host communication interface.

◆ GetPlatformScreenWarnings()

static bool FGenericPlatformMisc::GetPlatformScreenWarnings ( TArray< FText > &  PlatformScreenWarnings)
inlinestatic

Returns any platform specific warning messages we want printed on screen

◆ GetPlatformSpecificAsyncIOSystem()

static struct FAsyncIOSystemBase * FGenericPlatformMisc::GetPlatformSpecificAsyncIOSystem ( )
inlinestatic

Return the platform specific async IO system, or nullptr if the standard one should be used.

◆ GetPlatformUserForUserIndex()

FPlatformUserId FGenericPlatformMisc::GetPlatformUserForUserIndex ( int32  LocalUserIndex)
static

◆ GetPreferredLanguages()

TArray< FString > FGenericPlatformMisc::GetPreferredLanguages ( )
static

Returns an array of the user's preferred languages in order of preference

Returns
An array of language IDs ordered from most preferred to least

◆ GetPrimaryGPUBrand()

FString FGenericPlatformMisc::GetPrimaryGPUBrand ( )
static
Returns
primary GPU brand string

◆ GetProcessDiagnostics()

EProcessDiagnosticFlags FGenericPlatformMisc::GetProcessDiagnostics ( )
static

Returns non-zero if a performance-sensitive diagnostic, like a memory sanitizer, is detected for this process

◆ GetProcessorGroupDesc()

const FProcessorGroupDesc & FGenericPlatformMisc::GetProcessorGroupDesc ( )
static
Returns
a description of all the groups in the current system and their affinities

◆ GetSHA256Signature()

bool FGenericPlatformMisc::GetSHA256Signature ( const void Data,
uint32  ByteSize,
FSHA256Signature OutSignature 
)
static

Generates the SHA256 signature of the given data.

Parameters
DataPointer to the beginning of the data to hash
BytesizeSize of the data to has, in bytes.
OutSignatureOutput Structure to hold the computed signature.
Returns
whether the hash was computed successfully

◆ GetStoredValue()

bool FGenericPlatformMisc::GetStoredValue ( const FString &  InStoreId,
const FString &  InSectionName,
const FString &  InKeyName,
FString &  OutValue 
)
static

Get the value for the given section and key from the platform specific key->value store Note: The key->value store is user-specific, but may be used to share data between different applications for the same user

Parameters
InStoreIdThe name used to identify the store you want to use (eg, MyGame)
InSectionNameThe section that this key->value pair is placed within (can contain / separators, eg UserDetails/AccountInfo)
InKeyNameThe name of the key to get the value for
OutValueThe value found
Returns
bool true if the entry was found (and OutValue contains the result), false if not

◆ GetSystemErrorMessage()

const TCHAR * FGenericPlatformMisc::GetSystemErrorMessage ( TCHAR OutBuffer,
int32  BufferCount,
int32  Error 
)
static

Returns the last system error code in string form. NOTE: Only one return value is valid at a time!

Parameters
OutBufferthe buffer to be filled with the error message
BufferLengththe size of the buffer in character count
Errorthe error code to convert to string form

◆ GetSystemFontBytes()

TArray< uint8 > FGenericPlatformMisc::GetSystemFontBytes ( )
static
Returns
Memory representing a true type or open type font provided by the platform as a default font for unreal to consume; empty array if the default font failed to load.

◆ GetTimeZoneId()

FString FGenericPlatformMisc::GetTimeZoneId ( )
static

Get the timezone identifier for this platform, or an empty string if the default timezone calculation will work.

Note
This should return either an Olson timezone (eg, "America/Los_Angeles") or an offset from GMT/UTC (eg, "GMT-8:00").

◆ GetUBTArchitecture()

const TCHAR * FGenericPlatformMisc::GetUBTArchitecture ( )
static

◆ GetUBTPlatform()

const TCHAR * FGenericPlatformMisc::GetUBTPlatform ( )
static

◆ GetUBTTarget()

const TCHAR * FGenericPlatformMisc::GetUBTTarget ( )
static

◆ GetUBTTargetName()

const TCHAR * FGenericPlatformMisc::GetUBTTargetName ( )
static

◆ GetUniqueAdvertisingId()

FString FGenericPlatformMisc::GetUniqueAdvertisingId ( )
static

Returns a unique string for advertising identification

Returns
the unique string generated by this platform for this device

◆ GetUserIndexForPlatformUser()

int32 FGenericPlatformMisc::GetUserIndexForPlatformUser ( FPlatformUserId  PlatformUser)
static

◆ GetUseVirtualJoysticks()

static bool FGenericPlatformMisc::GetUseVirtualJoysticks ( )
inlinestatic

Returns whether the platform wants to use a touch screen for virtual joysticks.

◆ GetValidTargetPlatforms()

void FGenericPlatformMisc::GetValidTargetPlatforms ( TArray< FString > &  TargetPlatformNames)
static

Return an ordered list of target platforms this runtime can support (ie Android_DXT, Android would mean that it prefers Android_DXT, but can use Android as well)

◆ GetVirtualKeyboardInputHeight()

static const float FGenericPlatformMisc::GetVirtualKeyboardInputHeight ( )
inlinestatic

◆ GetVolumeButtonsHandledBySystem()

static bool FGenericPlatformMisc::GetVolumeButtonsHandledBySystem ( )
inlinestatic

◆ HasActiveWiFiConnection()

static bool FGenericPlatformMisc::HasActiveWiFiConnection ( )
inlinestatic

Returns whether WiFi connection is currently active

◆ HasMemoryWarningHandler()

static bool FGenericPlatformMisc::HasMemoryWarningHandler ( )
inlinestatic

Determines if a warning handler has been set

◆ HasNonoptionalCPUFeatures()

bool FGenericPlatformMisc::HasNonoptionalCPUFeatures ( )
static
Returns
whether this cpu supports certain required instructions or not

◆ HasPlatformFeature()

static bool FGenericPlatformMisc::HasPlatformFeature ( const TCHAR FeatureName)
inlinestatic

Returns whether the given platform feature is currently available (for instance, Metal is only available in IOS8 and with A7 devices)

◆ HasProjectPersistentDownloadDir()

static bool FGenericPlatformMisc::HasProjectPersistentDownloadDir ( )
inlinestatic

Return true if the PersistentDownloadDir is available. On some platforms, a writable directory might not be available by default. Using this function allows handling that case early.

◆ HasSeparateChannelForDebugOutput()

bool FGenericPlatformMisc::HasSeparateChannelForDebugOutput ( )
static

Whether the platform has a separate debug channel to stdout (eg. OutputDebugString on Windows). Used to suppress messages being output twice if both go to the same place.

◆ HasVariableHardware()

static bool FGenericPlatformMisc::HasVariableHardware ( )
inlinestatic

Returns whether the platform has variable hardware (configurable/upgradeable system).

◆ HidePlatformStartupScreen()

static void FGenericPlatformMisc::HidePlatformStartupScreen ( )
inlinestatic

◆ InitTaggedStorage()

static FORCEINLINE void FGenericPlatformMisc::InitTaggedStorage ( uint32  NumTags)
inlinestatic

Platform specific function for initializing storage of tagged memory buffers

◆ Is64bitOperatingSystem()

static FORCEINLINE bool FGenericPlatformMisc::Is64bitOperatingSystem ( )
inlinestatic

Detects whether we're running in a 64-bit operating system.

Returns
true if we're running in a 64-bit operating system

◆ IsCacheStorageAvailable()

static bool FGenericPlatformMisc::IsCacheStorageAvailable ( )
inlinestatic

For platforms that support cache storage functionality, setting a directory for it when it's not available can result in errors. This method's purpose is to be overridden in such platforms, with logic that checks if said cache is available. In all other platforms without this constraint, it should return true by default.

◆ IsDebuggerPresent()

static FORCEINLINE bool FGenericPlatformMisc::IsDebuggerPresent ( )
inlinestatic

Return true if a debugger is present

◆ IsEnsureAllowed()

static bool FGenericPlatformMisc::IsEnsureAllowed ( )
inlinestatic

Allows disabling ensure()s without rebuilding the binary, by either a commandline switch or a hotfix.

Returns
ensure is allowed

◆ IsInLowPowerMode()

static FORCEINLINE bool FGenericPlatformMisc::IsInLowPowerMode ( )
inlinestatic

◆ IsLocalPrintThreadSafe()

static bool FGenericPlatformMisc::IsLocalPrintThreadSafe ( )
inlinestatic

Whether LocalPrint can be called from any thread without overlapping

◆ IsLowLevelOutputDebugStringStructured()

bool FGenericPlatformMisc::IsLowLevelOutputDebugStringStructured ( )
static

Whether LowLevelOutputDebugString[f] can receive structured output as lines of JSON.

◆ IsPackagedForDistribution()

static bool FGenericPlatformMisc::IsPackagedForDistribution ( )
inlinestatic
Returns
true if this build is meant for release to retail

◆ IsPGIActive()

bool FGenericPlatformMisc::IsPGIActive ( )
static

Returns true if PGI (profile-guided instrumentation, needed for PGO) is currently ongoing. Note that on some platforms can start and stop profile data collection.

◆ IsPGICapableBinary()

bool FGenericPlatformMisc::IsPGICapableBinary ( )
static

Returns true if this binary has been instrumented for collection of data needed for profile-guided optimization (PGO) This value is not expected to change during the run-time

◆ IsPGOEnabled()

bool FGenericPlatformMisc::IsPGOEnabled ( )
static

Returns true if PGO is currently enabled

◆ IsRegisteredForRemoteNotifications()

bool FGenericPlatformMisc::IsRegisteredForRemoteNotifications ( )
static

Returns whether or not the device has been registered to receive remote notifications.

◆ IsRemoteSession()

static bool FGenericPlatformMisc::IsRemoteSession ( )
inlinestatic

Check to see if the platform is being viewed remotely. In such a mode we should aim to minimize screen refresh to get the best performance on the remote viewer

◆ IsRunningInCloud()

static bool FGenericPlatformMisc::IsRunningInCloud ( )
inlinestatic

Return if the game is running on cloud server

◆ IsRunningOnBattery()

bool FGenericPlatformMisc::IsRunningOnBattery ( )
static

Returns whether the platform is running on battery power or not.

◆ IsValidAbsolutePathFormat()

static bool FGenericPlatformMisc::IsValidAbsolutePathFormat ( const FString &  Path)
inlinestatic

Checks structure of the path against platform formatting requirements

return true if path is formatted validly

◆ LaunchDir()

const TCHAR * FGenericPlatformMisc::LaunchDir ( )
static

Get the directory the application was launched from (useful for commandline utilities)

◆ LoadTextFileFromPlatformPackage()

FString FGenericPlatformMisc::LoadTextFileFromPlatformPackage ( const FString &  RelativePath)
static

Loads a text file relative to the package root on platforms that distribute apps in package formats. For other platforms, the path is relative to the root directory.

◆ LocalPrint()

void FGenericPlatformMisc::LocalPrint ( const TCHAR Str)
static

Prints string to the default output

◆ LogNameEventStatsInit()

void FGenericPlatformMisc::LogNameEventStatsInit ( )
static

◆ LowLevelOutputDebugString()

void FGenericPlatformMisc::LowLevelOutputDebugString ( const TCHAR Message)
static

Sends a message to a remote tool, and debugger consoles

◆ LowLevelOutputDebugStringf()

void FGenericPlatformMisc::LowLevelOutputDebugStringf ( const TCHAR Format,
  ... 
)
static

◆ MemoryBarrier()

void FGenericPlatformMisc::MemoryBarrier ( )
static

Enforces strict memory load/store ordering across the memory barrier call.

◆ MessageBoxExt()

EAppReturnType::Type FGenericPlatformMisc::MessageBoxExt ( EAppMsgType::Type  MsgType,
const TCHAR Text,
const TCHAR Caption 
)
static

Show a message box if possible, otherwise print a message and return the default

Parameters
MsgTypeWhat sort of options are provided
TextSpecific message
CaptionString indicating the title of the message box
Returns
Very strange convention...not really EAppReturnType, see implementation

◆ NeedsNonoptionalCPUFeaturesCheck()

bool FGenericPlatformMisc::NeedsNonoptionalCPUFeaturesCheck ( )
static
Returns
whether to check for specific CPU compatibility or not

◆ NormalizePath() [1/2]

static void FGenericPlatformMisc::NormalizePath ( FString &  InPath)
inlinestatic

Platform-specific normalization of path E.g. on Linux/Unix platforms, replaces ~ with user home directory, so ~/.config becomes /home/joe/.config (or /Users/Joe/.config)

◆ NormalizePath() [2/2]

static void FGenericPlatformMisc::NormalizePath ( FStringBuilderBase InPath)
inlinestatic

Platform-specific normalization of path E.g. on Linux/Unix platforms, replaces ~ with user home directory, so ~/.config becomes /home/joe/.config (or /Users/Joe/.config)

◆ NumberOfCores()

int32 FGenericPlatformMisc::NumberOfCores ( )
static

return the number of hardware CPU cores

◆ NumberOfCoresIncludingHyperthreads()

int32 FGenericPlatformMisc::NumberOfCoresIncludingHyperthreads ( )
static

return the number of logical CPU cores

◆ NumberOfIOWorkerThreadsToSpawn()

int32 FGenericPlatformMisc::NumberOfIOWorkerThreadsToSpawn ( )
static

Return the number of worker threads we should spawn to service IO, NOT based on number of cores

◆ NumberOfWorkerThreadsToSpawn()

int32 FGenericPlatformMisc::NumberOfWorkerThreadsToSpawn ( )
static

Return the number of worker threads we should spawn, based on number of cores

◆ OsExecute()

static bool FGenericPlatformMisc::OsExecute ( const TCHAR CommandType,
const TCHAR Command,
const TCHAR CommandLine = NULL 
)
inlinestatic

Has the OS execute a command and path pair (such as launch a browser)

Parameters
ComandTypeOS hint as to the type of command
Commandthe command to execute
CommandLinethe commands to pass to the executable
Returns
whether the command was successful or not

◆ ParseChunkIdPakchunkIndexMapping()

void FGenericPlatformMisc::ParseChunkIdPakchunkIndexMapping ( TArray< FString >  ChunkIndexRedirects,
TMap< int32, int32 > &  OutMapping 
)
static

◆ PlatformHandleSplashScreen()

static void FGenericPlatformMisc::PlatformHandleSplashScreen ( bool  ShowSplashScreen = false)
inlinestatic

Called to dismiss splash screen

◆ PlatformInit()

static void FGenericPlatformMisc::PlatformInit ( )
inlinestatic

◆ PlatformPreInit()

void FGenericPlatformMisc::PlatformPreInit ( )
static

Called during appInit() after cmd line setup

◆ PlatformTearDown()

static void FGenericPlatformMisc::PlatformTearDown ( )
inlinestatic

Called during AppExit(). Log, Config still exist at this point, but not much else does.

◆ Prefetch() [1/2]

static FORCEINLINE void FGenericPlatformMisc::Prefetch ( const void Ptr)
inlinestatic

◆ Prefetch() [2/2]

static FORCEINLINE void FGenericPlatformMisc::Prefetch ( const void Ptr,
int32  Offset 
)
inlinestatic

◆ PrefetchBlock() [1/2]

static FORCEINLINE void FGenericPlatformMisc::PrefetchBlock ( const void Ptr)
inlinestatic

◆ PrefetchBlock() [2/2]

static FORCEINLINE void FGenericPlatformMisc::PrefetchBlock ( const void Ptr,
int32  NumBytes 
)
inlinestatic

◆ PrepareMobileHaptics()

static void FGenericPlatformMisc::PrepareMobileHaptics ( EMobileHapticsType  Type)
inlinestatic

For mobile devices, this will crank up a haptic engine for the specified type to be played later with TriggerMobileHaptics If this is called again before Release, it will switch to this type

◆ ProjectDir()

const TCHAR * FGenericPlatformMisc::ProjectDir ( )
static

Return the project directory

◆ PromptForRemoteDebugging()

static void FGenericPlatformMisc::PromptForRemoteDebugging ( bool  bIsEnsure)
inlinestatic

◆ PumpEssentialAppMessages()

static void FGenericPlatformMisc::PumpEssentialAppMessages ( )
inlinestatic

Pumps app messages only if there are essential keep-alive messages pending. This function called from time-sensitive parts of the code and should take minimal time if there are no essential messages waiting

◆ PumpMessagesForSlowTask()

static void FGenericPlatformMisc::PumpMessagesForSlowTask ( )
inlinestatic

◆ PumpMessagesOutsideMainLoop()

static void FGenericPlatformMisc::PumpMessagesOutsideMainLoop ( )
inlinestatic

◆ RaiseException()

void FGenericPlatformMisc::RaiseException ( uint32  ExceptionCode)
static

This is the last place to gather memory stats before exception.

◆ RegisterForRemoteNotifications()

void FGenericPlatformMisc::RegisterForRemoteNotifications ( )
static

Requests permission to send remote notifications to the user's device.

◆ ReleaseMobileHaptics()

static void FGenericPlatformMisc::ReleaseMobileHaptics ( )
inlinestatic

For mobile devices, this will shutdown the haptics, allowing system to put it to reset as needed

◆ RemoveNetworkListener()

bool FGenericPlatformMisc::RemoveNetworkListener ( FDelegateHandle  Handle)
static

◆ RequestDeviceCheckToken()

bool FGenericPlatformMisc::RequestDeviceCheckToken ( TFunction< void(const TArray< uint8 > &)>  QuerySucceededFunc,
TFunction< void(const FString &, const FString &)>  QueryFailedFunc 
)
static

◆ RequestExit()

void FGenericPlatformMisc::RequestExit ( bool  Force,
const TCHAR CallSite = nullptr 
)
static

Requests application exit.

Parameters
ForceIf true, perform immediate exit (dangerous because config code isn't flushed, etc). If false, request clean main-loop exit from the platform specific code.
CallSitea diagnostic message identifying the callsite.

◆ RequestExitWithStatus()

void FGenericPlatformMisc::RequestExitWithStatus ( bool  Force,
uint8  ReturnCode,
const TCHAR CallSite = nullptr 
)
static

Requests application exit with a specified return code. Name is different from RequestExit() so overloads of just one of functions are possible.

Parameters
ForceIf true, perform immediate exit (dangerous because config code isn't flushed, etc). If false, request clean main-loop exit from the platform specific code.
ReturnCodeThis value will be returned from the program (on the platforms where it's possible). Limited to 0-255 to conform with POSIX.
CallSitea diagnostic message identifying the callsite.

◆ RestartApplication()

bool FGenericPlatformMisc::RestartApplication ( )
static

Requests application to restart

◆ RestartApplicationWithCmdLine()

bool FGenericPlatformMisc::RestartApplicationWithCmdLine ( const char CmdLine)
static

Requests application to restart appending the passed in CmdLine to the restart

◆ RootDir()

const TCHAR * FGenericPlatformMisc::RootDir ( )
static

Get the application root directory.

◆ SetAllowedDeviceOrientation()

void FGenericPlatformMisc::SetAllowedDeviceOrientation ( EDeviceScreenOrientation  NewAllowedDeviceOrientation)
static

Change the allowed orientation of the device.

◆ SetBrightness()

static FORCEINLINE void FGenericPlatformMisc::SetBrightness ( float  bBright)
inlinestatic

◆ SetCrashHandler()

static void FGenericPlatformMisc::SetCrashHandler ( void(*)(const FGenericCrashContext &Context CrashHandler)
inlinestatic

Installs handler for the unexpected (due to error) termination of the program, including, but not limited to, crashes.

◆ SetCrashHandlingType()

static ECrashHandlingType FGenericPlatformMisc::SetCrashHandlingType ( ECrashHandlingType  Type)
inlinestatic

Sets the type of crash handling done by the engine. Returns the new crash handling type. If disabling crash handling make sure an alternative is active since threads that crash will just disappear.

◆ SetDeviceOrientation()

void FGenericPlatformMisc::SetDeviceOrientation ( EDeviceScreenOrientation  NewDeviceOrientation)
static

Change the orientation of the device.

◆ SetEnvironmentVar()

void FGenericPlatformMisc::SetEnvironmentVar ( const TCHAR VariableName,
const TCHAR Value 
)
static

Sets an environment variable to the local process's environment

Parameters
VariableNameThe name of the variable (ie "Path")
ValueThe string to set the variable to.

◆ SetGracefulTerminationHandler()

static void FGenericPlatformMisc::SetGracefulTerminationHandler ( )
inlinestatic

Set/restore the Console Interrupt (Control-C, Control-Break, Close) handler.

◆ SetLastError()

static void FGenericPlatformMisc::SetLastError ( uint32  ErrorCode)
inlinestatic

◆ SetMemoryWarningHandler()

static void FGenericPlatformMisc::SetMemoryWarningHandler ( void(*)(const FGenericMemoryWarningContext &Context Handler)
inlinestatic

Set a handler to be called when there is a memory warning from the OS

Parameters
HandlerThe handler to call

◆ SetNetworkConnectionStatus()

void FGenericPlatformMisc::SetNetworkConnectionStatus ( ENetworkConnectionStatus  NewNetworkConnectionStatus)
static

Updates the current status for the network connection

◆ SetOverrideProjectDir()

void FGenericPlatformMisc::SetOverrideProjectDir ( const FString &  InOverrideDir)
static

Allows a game/program/etc to control the game directory in a special place (for instance, monolithic programs that don't have .uprojects)

◆ SetShouldPromptForRemoteDebugging()

static void FGenericPlatformMisc::SetShouldPromptForRemoteDebugging ( bool  bInShouldPrompt)
inlinestatic

◆ SetShouldPromptForRemoteDebugOnEnsure()

static void FGenericPlatformMisc::SetShouldPromptForRemoteDebugOnEnsure ( bool  bInShouldPrompt)
inlinestatic

◆ SetStoredValue()

bool FGenericPlatformMisc::SetStoredValue ( const FString &  InStoreId,
const FString &  InSectionName,
const FString &  InKeyName,
const FString &  InValue 
)
static

Set the value for the given section and key in the platform specific key->value store Note: The key->value store is user-specific, but may be used to share data between different applications for the same user

Parameters
InStoreIdThe name used to identify the store you want to use (eg, MyGame)
InSectionNameThe section that this key->value pair is placed within (can contain / separators, eg UserDetails/AccountInfo)
InKeyNameThe name of the key to set the value for
InValueThe value to set
Returns
bool true if the value was set correctly, false if not

◆ SetStoredValues()

bool FGenericPlatformMisc::SetStoredValues ( const FString &  InStoreId,
const FString &  InSectionName,
const TMap< FString, FString > &  InKeyValues 
)
static

Set the value for the given section and key in the platform specific key->value store Note: The key->value store is user-specific, but may be used to share data between different applications for the same user

Parameters
InStoreIdThe name used to identify the store you want to use (eg, MyGame)
InSectionNameThe section that this key->value pair is placed within (can contain / separators, eg UserDetails/AccountInfo)
InKeyValuesThe mapping of key->value pairs to set
Returns
bool true if the value was set correctly, false if not

◆ SetUBTTargetName()

void FGenericPlatformMisc::SetUBTTargetName ( const TCHAR InTargetName)
static

◆ SetupSyscallFilters()

static bool FGenericPlatformMisc::SetupSyscallFilters ( )
inlinestatic

◆ SetUTF8Output()

void FGenericPlatformMisc::SetUTF8Output ( )
static

Sets the default output to UTF8

◆ SetVolumeButtonsHandledBySystem()

static void FGenericPlatformMisc::SetVolumeButtonsHandledBySystem ( bool  enabled)
inlinestatic

◆ ShareURL()

static void FGenericPlatformMisc::ShareURL ( const FString &  URL,
const FText Description,
int32  LocationHintX,
int32  LocationHintY 
)
inlinestatic

Perform a mobile-style sharing of a URL. Will use native UI to display sharing target

◆ ShouldDisablePluginAtRuntime()

static bool FGenericPlatformMisc::ShouldDisablePluginAtRuntime ( const FString &  PluginName)
inlinestatic

Allows platform at runtime to disable unsupported plugins

Parameters
PluginNameName of enabled plugin to consider
Returns
bool true if plugin should be disabled

◆ ShouldDisplayTouchInterfaceOnFakingTouchEvents()

static bool FGenericPlatformMisc::ShouldDisplayTouchInterfaceOnFakingTouchEvents ( )
inlinestatic

◆ ShowConsoleWindow()

void FGenericPlatformMisc::ShowConsoleWindow ( )
static

◆ ShutdownTaggedStorage()

static FORCEINLINE void FGenericPlatformMisc::ShutdownTaggedStorage ( )
inlinestatic

Platform specific function for freeing storage of tagged memory buffers

◆ StartNewPGOCollection()

static bool FGenericPlatformMisc::StartNewPGOCollection ( const FString &  AbsoluteFileName)
inlinestatic

On platforms that support run-time PGI on/off, starts a new collection with a given file name.

Parameters
AbsoluteFileNameFile to put the collection into
Returns
true if everything was successful

◆ StatNamedEvent()

template<typename CharType >
template CORE_API void FGenericPlatformMisc::StatNamedEvent< TCHAR > ( const CharType *  Text)
static

Stats logging for named event

◆ StopPGOCollectionAndCloseFile()

static bool FGenericPlatformMisc::StopPGOCollectionAndCloseFile ( )
inlinestatic

On platforms that support run-time PGI on/off, stops the current collection and writes out the file (or completes its write). The filename must have been given to the StartNewPGICollection() at the start of collection (it is needed in advance since the collection process may stream to it).

Returns
true if everything was successful

◆ SubmitErrorReport()

void FGenericPlatformMisc::SubmitErrorReport ( const TCHAR InErrorHist,
EErrorReportMode::Type  InMode 
)
static

Submits a crash report to a central server (release builds only)

◆ SupportsBackbufferSampling()

static FORCEINLINE bool FGenericPlatformMisc::SupportsBackbufferSampling ( )
inlinestatic

◆ SupportsBrightness()

static FORCEINLINE bool FGenericPlatformMisc::SupportsBrightness ( )
inlinestatic

◆ SupportsDeviceCheckToken()

static bool FGenericPlatformMisc::SupportsDeviceCheckToken ( )
inlinestatic

◆ SupportsForceTouchInput()

static bool FGenericPlatformMisc::SupportsForceTouchInput ( )
inlinestatic

◆ SupportsFullCrashDumps()

static bool FGenericPlatformMisc::SupportsFullCrashDumps ( )
inlinestatic

Platform can generate a full-memory crashdump during crash handling.

◆ SupportsLocalCaching()

static bool FGenericPlatformMisc::SupportsLocalCaching ( )
inlinestatic

◆ SupportsMessaging()

static bool FGenericPlatformMisc::SupportsMessaging ( )
inlinestatic

◆ SupportsMultithreadedFileHandles()

static bool FGenericPlatformMisc::SupportsMultithreadedFileHandles ( )
inlinestatic
Returns
Whether filehandles can be opened on one thread and read/written on another thread

◆ SupportsTouchInput()

static bool FGenericPlatformMisc::SupportsTouchInput ( )
inlinestatic

◆ TagBuffer()

static FORCEINLINE void FGenericPlatformMisc::TagBuffer ( const char Label,
uint32  Category,
const void Buffer,
size_t  BufferSize 
)
inlinestatic

Platform specific function for tagging a memory buffer with a label. Helps see memory access in profilers

◆ TearDown()

void FGenericPlatformMisc::TearDown ( )
static

Frees any memory retained by FGenericPlatformMisc.

◆ TickHotfixables()

void FGenericPlatformMisc::TickHotfixables ( )
static

Ticks values that can be hotfixable in the config.

◆ TickStatNamedEvents()

void FGenericPlatformMisc::TickStatNamedEvents ( )
static

◆ TriggerMobileHaptics()

static void FGenericPlatformMisc::TriggerMobileHaptics ( )
inlinestatic

For mobile devices, this will kick the haptic type that was set in PrepareMobileHaptics. It can be called multiple times with only a single call to Prepare

◆ UE_DEPRECATED()

FGenericPlatformMisc::UE_DEPRECATED ( 4.  18,
"FPaths::SetOverrideGameDir() has been superseded by FPaths::SetOverrideProjectDir()."   
) const &
inline

◆ UnregisterForRemoteNotifications()

void FGenericPlatformMisc::UnregisterForRemoteNotifications ( )
static

Requests unregistering from receiving remote notifications on the user's device.

◆ UpdateHotfixableEnsureSettings()

static void FGenericPlatformMisc::UpdateHotfixableEnsureSettings ( )
inlinestatic

Updates hotfixable ensure settings from config and commandline (config takes priority).

◆ UseHDRByDefault()

static FORCEINLINE bool FGenericPlatformMisc::UseHDRByDefault ( )
inlinestatic

◆ UseRenderThread()

bool FGenericPlatformMisc::UseRenderThread ( )
static

Checks if platform wants to use a rendering thread on current device

Returns
true if allowed, false if shouldn't use a separate rendering thread

◆ VersionCheckPlatformName()

const FString FGenericPlatformMisc::VersionCheckPlatformName ( )
static

◆ WasLaunchedStreaming()

static bool FGenericPlatformMisc::WasLaunchedStreaming ( )
inlinestatic

Return true if the game is being streamed to a separate client device

Member Data Documentation

◆ AllowedDeviceOrientation

EDeviceScreenOrientation FGenericPlatformMisc::AllowedDeviceOrientation = EDeviceScreenOrientation::Unknown
staticprotected

◆ bPromptForRemoteDebugOnEnsure

bool FGenericPlatformMisc::bPromptForRemoteDebugOnEnsure = false
staticprotected

Whether the user should be prompted to allow for a remote debugger to be attached on an ensure

◆ bShouldPromptForRemoteDebugging

bool FGenericPlatformMisc::bShouldPromptForRemoteDebugging = false
staticprotected

Whether the user should be prompted to allow for a remote debugger to be attached

◆ CurrentNetworkConnectionStatus

ENetworkConnectionStatus FGenericPlatformMisc::CurrentNetworkConnectionStatus = ENetworkConnectionStatus::Connected
staticprotected

The documentation for this struct was generated from the following files: