Create new UDeveloperSettings class
#pragma once
#include "CoreMinimal.h"
#include "Engine/DeveloperSettings.h"
#include "ClassName.generated.h"
/**
*
*/
UCLASS(Config = Game, defaultconfig, meta = (DisplayName = "Your Display Name"))
class UClassName : public UDeveloperSettings
{
GENERATED_BODY()
};
Create variables
#pragma once
#include "CoreMinimal.h"
#include "Engine/DeveloperSettings.h"
#include "ClassName.generated.h"
/**
*
*/
UCLASS(Config = Game, defaultconfig, meta = (DisplayName = "Your Display Name"))
class UClassName : public UDeveloperSettings
{
GENERATED_BODY()
public:
UPROPERTY(Config, EditAnywhere, BlueprintReadOnly, Category = "General")
TArray<FName> SettingsPropertyName;
};
Add DeveloperSettings Module to Build.cs
PublicDependencyModuleNames.AddRange(
new string[]
{
"Core",
"DeveloperSettings",
// ... add other public dependencies that you statically link with here ...
}
);
Load Class Defaults Object
const UClassName* ProperyName = GetDefault<UClassName>();
// Access defaults from DefaultGame.ini
OtherProperty = PropertyName->SettingsPropertyName;
<aside> 📄
</aside>