Skip to content

Load and inspect UDeveloperSettings config arrays in a packaged Linux game

Section titled “Load and inspect UDeveloperSettings config arrays in a packaged Linux game”
  • Status: Current.
  • Engine: ue6-main 61e2877e1, Linux x86_64, Epic clang 23.1.5 (v27 SDK).
  • Context: Standalone UE6 with a native runtime module. The check reads native reflected settings in a Linux Development game.
  • Prerequisites: A cookable C++ project, a project runtime module, and a Linux Development package.

A successful cook gives no evidence that a packaged game actually loaded the project’s config defaults. The game can start while its settings object still holds zero values or empty arrays.

Add DeveloperSettings as a module dependency and put the following in CoopRules.h in the CoopZero runtime module.

#pragma once
#include "Engine/DeveloperSettings.h"
#include "CoopRules.generated.h"
USTRUCT()
struct FCoopItemRule
{
GENERATED_BODY()
UPROPERTY()
FName Id;
UPROPERTY()
int32 SellPrice = 0;
};
UCLASS(Config = Game, DefaultConfig)
class UCoopRules : public UDeveloperSettings
{
GENERATED_BODY()
public:
UPROPERTY(Config)
int32 LightSeconds;
UPROPERTY(Config)
TArray<FCoopItemRule> Items;
};

Set defaults in Config/DefaultGame.ini. The section names the runtime module and the reflected class.

[/Script/CoopZero.CoopRules]
LightSeconds=1200
+Items=(Id=Egg,SellPrice=8)

Call GetDefault<UCoopRules>() during game-instance initialization and log a configured value. BuildCookRun stages the Game config through its regular UFS rules. For a Development build, pass getall CoopRules Items SHOWDEFAULTS in -ExecCmds to inspect the packaged class default object.

Check the fallback when a config key is absent. Give each native scalar member a C++ initializer. Unreal can then leave the member at the intended fallback when the Game hierarchy omits that key. At game-instance startup, look up the class path section in GConfig with GGameIni. Walk the class’s own CPF_Config properties and check whether each name is present in the merged section. A configured zero or False is still present, so checking property values alone would misidentify those cases.

For a Development test, create a separate INI fixture and pass -DEFGameINI=/absolute/path/to/fixture.ini. Coop Zero’s Step 03 fixture removes LightSeconds, LayIntervalSeconds, EggsFertile and ChickGrowsAt and overrides DarkSeconds to 601. The source INI stays in place. The check uses getall CoopRules ... SHOWDEFAULTS for the fallback values outside the normal startup summary.

Config=Game selects the Game ini hierarchy. The Config flag is on the owning array and the struct’s reflected members supply the importable fields. +Items= appends a struct entry. For a positional array that may contain duplicate values, use . on each line to retain duplicate entries. Coop Zero uses that syntax for its per-hen laying progress. Epic’s configuration file syntax.

  • Evidence level: Runs in packaged build. The headless editor game also logged the same startup line. The fallback check reached runs in editor and runs in packaged build.
  • How: Coop Zero Step 02 used the filesystem cook and IoStore recipe with BuildCookRun -platform=Linux -clientconfig=Development -build -cook -stage -pak -archive. The archived Manifest_UFSFiles_Linux.txt lists CoopZero/Config/DefaultGame.ini. The following command uses the build wrapper $WRAP, with $P set to the project root (README).
Terminal window
"$WRAP" step02-packaged-game timeout -k 15s 120s "$P/Out/Linux/CoopZero.sh" \
-nullrhi -nosound -unattended -stdout \
'-ExecCmds=getall CoopRules Items SHOWDEFAULTS,getall CoopRules Animals SHOWDEFAULTS,getall CoopRules LayStartProgress SHOWDEFAULTS,quit' \
-abslog="$P/Saved/step02-packaged-game.log"

The command exited 0. Log line 974 contains LogCoopZero: RULES light_s=1200 dark_s=600 start_coins=0 sell_price=8. Lines 1055–1064 show the reflected config arrays, including (ID="Egg",SellPrice=8) and ordered progress 0.850000, 0.650000, 0.450000.

Coop Zero Step 03, with the fixture: both the editor executable in -game -nullrhi and the Linux Development archive logged four Missing CoopRules config key warnings and RULES light_s=1200 dark_s=601 start_coins=0 sell_price=8. The console dumps reported EggsFertile = True, ChickGrowsAt = NextDawn, and LayIntervalSeconds = 600.000000. See the exact commands and output in the Step 03 project report and Saved/step03-{editor,packaged}-missing-rules.log.

  • Date / by: 2026-11-25, Coop Zero Step 02. The fallback check: 2026-11-25, Coop Zero Step 03.

The proof covers project defaults and native startup in the Linux Development package. Shipping console access, runtime pack overrides and save compatibility remain unverified.

The fallback check covers missing keys and a present override. Malformed values and Shipping were outside this test.