SDK configuration #

The Pragma SDK reads configuration values from several sources, resolved in priority order. Higher-priority sources override lower ones. In most cases, values can be reloaded at runtime when the underlying config file changes on disk.

Pragma.ini and Game.ini #

The SDK reads .ini files at two levels:

  • Pragma.ini is a standalone file shipped alongside your game. It can be placed at %RootDir%/Pragma.ini or %ProjectDir%/Config/Pragma.ini, or specified on the command line with -PragmaIni=my/path/Pragma.ini. Because it lives outside the packaged build, you can change values per deployment without rebuilding.
  • Game.ini is the standard Unreal config file at %ProjectDir%/Saved/Config/%Platform%/Game.ini. Note: Game.ini overrides do not work in UE_BUILD_SHIPPING client builds. You can also set defaults in %ProjectDir%/Config/DefaultGame.ini, which is packaged into the build.

Do not package a Pragma.ini file into the build. If a packaged copy exists, the SDK will always use it and external overrides will have no effect.

Avoid putting internal Urls in DefaultGame.ini, as they may leak into shipping builds. Use Pragma.ini for environment-specific values instead.

Override on the command line #

You can override individual SDK values on the command line using -Pragma<variable>=<value>:

-PragmaBackendAddress=http://127.0.0.1:10000

Full list of command-line overrides:

OverrideDescription
-PragmaIni=Path to a custom Pragma.ini file.
-PragmaBackendAddress=Backend address for the game backend.
-PragmaPartnerBackendAddress=Backend address for the partner backend.
-PragmaDebug=Enable debug mode (not available in UE_BUILD_SHIPPING).
-OverrideSocialProtocol=Override the social backend protocol.
-OverrideGameProtocol=Override the game backend protocol.
-OverrideSocialHost=Override the social backend host.
-OverrideGameHost=Override the game backend host.
-OverrideSocialPort=Override the social backend port.
-OverrideGamePort=Override the game backend port.
-PragmaProtocolType=Protocol type for the game backend.
-PragmaPartnerProtocolType=Protocol type for the partner backend.
-PragmaPartnerSessionSocialAuthToken=Auth token for partner social sessions.
-PragmaPartnerSessionGameAuthToken=Auth token for partner game sessions.

Precedence rules #

Configuration sources are applied in the following order, from highest to lowest priority. Each source overrides any values set by the sources below it.

  1. Code (set directly on the Pragma Runtime config)
  2. Command-line arguments (-Pragma<variable>=<value>)
  3. Pragma.ini override (recommended for deploy-time configuration)
  4. Game.ini override (does not apply in shipping builds)
  5. DefaultGame.ini (packaged defaults)