UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
DataDrivenPlatformInfoRegistry.h
Go to the documentation of this file.
1// Copyright Epic Games, Inc. All Rights Reserved.
2
3#pragma once
4
5#include "Containers/Array.h"
6#include "Containers/Map.h"
8#include "CoreTypes.h"
9#include "HAL/PlatformCrt.h"
11#include "Misc/Guid.h"
12#include "UObject/NameTypes.h"
13#include "UObject/UnrealNames.h"
14
15class FConfigFile;
16
17#define DDPI_HAS_EXTENDED_PLATFORMINFO_DATA (WITH_EDITOR || IS_PROGRAM)
18
27
28#if DDPI_HAS_EXTENDED_PLATFORMINFO_DATA
29
30
32enum class EPlatformIconSize : uint8
33{
35 Normal,
36
38 Large,
39
41 XLarge,
42};
43
44
45
46// enum class EPlatformSDKStatus : uint8
47// {
48// /** SDK status is unknown */
49// Unknown,
50//
51// /** SDK is installed */
52// Installed,
53//
54// /** SDK is not installed */
55// NotInstalled,
56// };
57
60{
62 {
63 }
64
65 FPlatformIconPaths(const FString& InIconPath)
69 {
70 }
71
72 FPlatformIconPaths(const FString& InNormalPath, const FString& InLargePath)
76 {
77 }
78
79 FPlatformIconPaths(const FString& InNormalPath, const FString& InLargePath, const FString& InXLargePath)
83 {
84 }
85
87 FString NormalPath;
88
90 FString LargePath;
91
93 FString XLargePath;
94};
95
96
99{
100 FName PlatformName;
101 FName ShaderFormat;
105 FString ActiveIconPath;
107 FString InactiveIconPath;
112 FName DeviceProfileName;
113};
114
115#endif
116
117
118// Information about a platform loaded from disk
120{
121 // copy of the platform name, same as the Key into GetAllPlatformInfos()
123
124 // cached list of ini parents
126
127 // is this platform confidential
128 bool bIsConfidential = false;
129
130 // some platforms are here just for IniParentChain needs and are not concrete platforms
131 bool bIsFakePlatform = false;
132
133 // the name of the ini section to use to load target platform settings (used at runtime and cooktime)
135
136 // list of additional restricted folders
138
139 // GUID to represent this platform forever
141
142 // MemoryFreezing information, matches FPlatformTypeLayoutParameters - defaults are clang, noneditor
144 bool Freezing_b32Bit = false;
147
148 // True if this platform has a non-generic gamepad specifically associated with it
150
151 // True if this platform handles input via standard keyboard layout by default, translates to PC platform
153
154 // Input-related settings
156 FString DefaultInputType = "Gamepad";
158 bool bSupportsGamepad = true;
160 bool bSupportsTouch = false;
161
162 // the compression format that this platform wants; overrides game unless bForceUseProjectCompressionFormat
164
167
169 {
171 {
173 }
174 return IniPlatformName;
175 }
176
177 // NOTE: add more settings here (and read them in in the LoadDDPIIniSettings() function in the .cpp)
178
179
180#if DDPI_HAS_EXTENDED_PLATFORMINFO_DATA
181
182public:
183
184
185 // setting moved from PlatformInfo::FTargetPlatformInfo
186
187
190
192 FString AutoSDKPath;
193
195 FString SDKTutorial;
196
199
202
205 FString UBTPlatformString;
206
209
211 bool bEnabledForUse;
212
215
218
221
222
223
226 {
227 switch (InIconSize)
228 {
229 case EPlatformIconSize::Normal:
230 return IconPaths.NormalStyleName;
231 case EPlatformIconSize::Large:
232 return IconPaths.LargeStyleName;
233 case EPlatformIconSize::XLarge:
234 return IconPaths.XLargeStyleName;
235 default:
236 break;
237 }
238 return NAME_None;
239 }
240
242 const FString& GetIconPath(const EPlatformIconSize InIconSize) const
243 {
244 switch (InIconSize)
245 {
246 case EPlatformIconSize::Normal:
247 return IconPaths.NormalPath;
248 case EPlatformIconSize::Large:
249 return IconPaths.LargePath;
250 case EPlatformIconSize::XLarge:
251 return IconPaths.XLargePath;
252 default:
253 break;
254 }
255 static const FString EmptyString = TEXT("");
256 return EmptyString;
257 }
258
259private:
261
262#endif
263};
264
265
267{
268
273
281
287
292 static CORE_API const FDataDrivenPlatformInfo& GetPlatformInfo(const FString& PlatformName);
293 static CORE_API const FDataDrivenPlatformInfo& GetPlatformInfo(FName PlatformName);
294 static CORE_API const FDataDrivenPlatformInfo& GetPlatformInfo(const char* PlatformName);
295
296
302
303 UE_DEPRECATED(5.1, "Use GetSoprtedPlatformNames that takes a PlatformType parameter")
308 UE_DEPRECATED(5.1, "Use GetSortedPlatformInfos that takes a PlatformType parameter")
313
319
324
328 static CORE_API bool LoadDataDrivenIniFile(int32 Index, FConfigFile& IniFile, FString& PlatformName);
329
330
331#if DDPI_HAS_EXTENDED_PLATFORMINFO_DATA
336 enum class EPlatformNameType
337 {
338 // for instance Win64
339 UBT,
340 // for instance Windows
341 Ini,
342 // for instance WindowsClient
343 TargetPlatform,
344 };
346
350 static CORE_API void ClearDeviceStatus(FName PlatformName);
351
352 static CORE_API FDataDrivenPlatformInfo& DeviceIdToInfo(FString DeviceId, FString* OutDeviceName = nullptr);
353
358
363
365 static CORE_API bool IsPlatformHiddenFromUI(FName PlatformName);
366 static CORE_API void SetPlatformHiddenFromUI(FName PlatformName);
367
368private:
372 friend class FTurkeySupportModule;
375
376#endif
377
378};
379
@ Normal
Definition AndroidInputInterface.h:116
#define UE_DEPRECATED(Version, Message)
Definition CoreMiscDefines.h:302
#define TEXT(x)
Definition Platform.h:1272
FPlatformTypes::int32 int32
A 32-bit signed integer.
Definition Platform.h:1125
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
EPlatformInfoType
Definition DataDrivenPlatformInfoRegistry.h:20
uint8_t uint8
Definition binka_ue_file_header.h:8
uint32_t uint32
Definition binka_ue_file_header.h:6
Definition ConfigCacheIni.h:566
Definition NameTypes.h:617
FORCEINLINE bool IsNone() const
Definition NameTypes.h:827
bool IsValid() const
Definition NameTypes.h:842
Definition Text.h:385
Definition Array.h:670
Definition UnrealString.h.inl:34
U16 Index
Definition radfft.cpp:71
Definition DataDrivenPlatformInfoRegistry.h:267
static CORE_API bool LoadDataDrivenIniFile(int32 Index, FConfigFile &IniFile, FString &PlatformName)
Definition DataDrivenPlatformInfoRegistry.cpp:74
static CORE_API const TArray< FName > & GetConfidentialPlatforms()
Definition DataDrivenPlatformInfoRegistry.cpp:609
static const TArray< const FDataDrivenPlatformInfo * > & GetSortedPlatformInfos()
Definition DataDrivenPlatformInfoRegistry.h:309
static const TArray< FName > GetSortedPlatformNames()
Definition DataDrivenPlatformInfoRegistry.h:304
static CORE_API const TMap< FName, FDataDrivenPlatformInfo > & GetAllPlatformInfos()
Definition DataDrivenPlatformInfoRegistry.cpp:438
static CORE_API const TArray< FString > & GetPlatformDirectoryNames(bool bCheckValid)
Definition DataDrivenPlatformInfoRegistry.cpp:549
static CORE_API int32 GetNumDataDrivenIniFiles()
Definition DataDrivenPlatformInfoRegistry.cpp:69
static CORE_API const FDataDrivenPlatformInfo & GetPlatformInfo(const FString &PlatformName)
Definition DataDrivenPlatformInfoRegistry.cpp:598
static const TArray< FString > & GetValidPlatformDirectoryNames()
Definition DataDrivenPlatformInfoRegistry.h:286
Definition DataDrivenPlatformInfoRegistry.h:120
bool bSupportsMouseAndKeyboard
Definition DataDrivenPlatformInfoRegistry.h:157
const FName & GetCookPlatformName() const
Definition DataDrivenPlatformInfoRegistry.h:168
FString HardwareCompressionFormat
Definition DataDrivenPlatformInfoRegistry.h:163
bool Freezing_b32Bit
Definition DataDrivenPlatformInfoRegistry.h:144
FName IniPlatformName
Definition DataDrivenPlatformInfoRegistry.h:122
bool bIsFakePlatform
Definition DataDrivenPlatformInfoRegistry.h:131
bool bSupportsGamepad
Definition DataDrivenPlatformInfoRegistry.h:158
TArray< FString > IniParentChain
Definition DataDrivenPlatformInfoRegistry.h:125
uint32 Freezing_MaxFieldAlignment
Definition DataDrivenPlatformInfoRegistry.h:143
bool Freezing_bAlignBases
Definition DataDrivenPlatformInfoRegistry.h:146
bool bCanChangeGamepadType
Definition DataDrivenPlatformInfoRegistry.h:159
TArray< FString > AdditionalRestrictedFolders
Definition DataDrivenPlatformInfoRegistry.h:137
bool bHasDedicatedGamepad
Definition DataDrivenPlatformInfoRegistry.h:149
FName OverrideCookPlatformName
Definition DataDrivenPlatformInfoRegistry.h:166
bool bInputSupportConfigurable
Definition DataDrivenPlatformInfoRegistry.h:155
FString DefaultInputType
Definition DataDrivenPlatformInfoRegistry.h:156
bool bDefaultInputStandardKeyboard
Definition DataDrivenPlatformInfoRegistry.h:152
bool Freezing_bForce64BitMemoryImagePointers
Definition DataDrivenPlatformInfoRegistry.h:145
bool bSupportsTouch
Definition DataDrivenPlatformInfoRegistry.h:160
FGuid GlobalIdentifier
Definition DataDrivenPlatformInfoRegistry.h:140
FString TargetSettingsIniSectionName
Definition DataDrivenPlatformInfoRegistry.h:134
bool bIsConfidential
Definition DataDrivenPlatformInfoRegistry.h:128
Definition Guid.h:109