Skip to content

Remote Config Examples

This section demonstrates practical usage of Firebase Remote Config in Unreal Engine projects. Remote Config allows you to control game behavior and balance remotely, without rebuilding or updating the application.

Remote Config values can be fetched from the network or fall back to predefined default values if the device is offline or a fetch fails.

All examples below are shown using Blueprint nodes, as this is the most common workflow. The same functionality is available through the corresponding C++ API.

All examples assume that Firebase has already been successfully initialized.


Initializing Remote Config

Before using any Remote Config functionality, the module must be initialized.

Initialization should be performed once, typically right after Firebase initialization. Repeated initialization is not required.

After initialization, you can safely set default values and fetch remote configuration data.


Fetching and Activating Remote Config

To retrieve updated values from Firebase, use Fetch and Activate Remote Config. This method downloads the latest configuration and immediately makes it available to the application.

This is the recommended production workflow.

  • On success, fetched values override defaults
  • On failure, default values remain active
  • Game logic should continue to work in both cases

Remote Config fetch failures should not block gameplay or cause errors.


Reading Remote Config Values

After Remote Config values are available, they can be read synchronously using getter functions.

In this example, Remote Config values are applied directly to gameplay logic:

  • a boolean flag enables or disables hard mode
  • a numeric multiplier affects enemy damage
  • an integer limits reward usage
  • a string value can be displayed in the UI

Available getters include:

  • GetRemoteConfigBoolean
  • GetRemoteConfigLong
  • GetRemoteConfigDouble
  • GetRemoteConfigString

If a value was not fetched successfully, the corresponding default value is returned.


Setting Default Values

Default values provide a safe baseline for your game configuration. They are used when:

  • the application is launched for the first time
  • the device is offline
  • fetching Remote Config values fails

Setting defaults ensures that your game logic always has valid values to work with.

Default values should be set immediately after Remote Config initialization and before calling any getters or Fetch and Activate functions. This guarantees that all subsequent Remote Config operations always return valid values, even if a fetch has not yet occurred or fails.

Default keys must exactly match the keys defined in the Firebase Console.


Summary

Firebase Remote Config provides a safe and flexible way to adjust gameplay parameters and feature flags remotely.

By combining initialization, default values, fetch and activate, and synchronous getters, you can build a reliable configuration system that works both online and offline and scales well in production projects.