Navigation
API > API/Runtime > API/Runtime/DeveloperSettings
The base class of any per platform settings. The pattern for using these is as follows.
Step 1) Subclass UPlatformSettings, UMyPerPlatformSettings : public UPlatformSettings.
Step 2) For your system should already have a UDeveloperSettings that you created so that users can customize other properties for your system in the project. On that class you need to create a property of type FPerPlatformSettings, e.g.
FPerPlatformSettings PlatformOptions
Step 3) In your UDeveloperSettings subclasses construct, there should be a line like this, PlatformOptions.Settings.Initialize(UMyPerPlatformSettings::StaticClass()); This will actually ensure that you initialize the settings exposed in the editor to whatever the current platform configuration is for them.
Step 4) Nothing else needed. In your system code, you will just call UMyPerPlatformSettings* MySettings = UPlatformSettingsManager::Get().GetSettingsForPlatform
| Name | UPlatformSettings |
| Type | class |
| Header File | /Engine/Source/Runtime/DeveloperSettings/Public/Engine/PlatformSettings.h |
| Include Path | #include "Engine/PlatformSettings.h" |
Syntax
UCLASS (Abstract, PerObjectConfig, MinimalAPI)
class UPlatformSettings : public UObject
Inheritance Hierarchy
- UObjectBase → UObjectBaseUtility → UObject → UPlatformSettings
Derived Classes
- UCommonInputPlatformSettings
- UEnhancedInputPlatformSettings
- UGameInputPlatformSettings
- UInputPlatformSettings
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
UPlatformSettings
(
const FObjectInitializer& ObjectInitializer |
Engine/PlatformSettings.h |
Variables
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| ConfigPlatformName | FName | The platform we are an instance of settings for. | Engine/PlatformSettings.h | |
| ConfigPlatformNameStr | FString | Engine/PlatformSettings.h | ||
| UPlatformSettingsManager | friend | Engine/PlatformSettings.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual const TCHAR * GetConfigOverridePlatform() |
Engine/PlatformSettings.h | ||
FName GetPlatformIniName() |
Engine/PlatformSettings.h | ||
virtual void InitializePlatformDefaults() |
Engine/PlatformSettings.h |