Updating Configs using N-Testing
Caution
This workflow applies to versions of com.homagames.liveops prior to 0.10.0. Starting from 0.10.0, bindings using this method no longer work and migrating to the LiveOpsValue attribute is required.
Modifying configuration at runtime can be useful for testing different game configurations without the need to rebuild the game. In this tutorial, you'll learn how to modify a config object using N-Testing parameters.
Requirements
- You completed the Accessing Configs tutorial.
com.homagames.sdk-coreversion 5.0.1 or higher is installed.com.homagames.configurationversion 1.0.0 or higher is installed.- Access to Homa Lab.
Define N-Testing parameter
Create a new parameter in N-Testing to modify the HealthScalingFactor property of the
EnemyBalanceConfig created in the Creating a Config tutorial.
In the Homa Lab main page:
- Click the "Game Ops" > "Configuration" > "Parameters" from the left sidebar.
- Select the game you want to change the configuration for.
- Click the "Add Parameter" button.

Create a new parameter with the following settings:
- Parameter name:
health_scaling(can be any name) - Data type:
Float - Value: The new value for the
HealthScalingFactorproperty.

Create N-Testing Config
Back in your Unity project, create the N-Testing config file if it doesn't exist yet.
Right-click in the Project window, select Create > Homa > Config, and from the pop-up window, double-click the "N Testing Config" item.

Tip
To see all config files in the project, type t:ConfigAsset in the search bar of the Project window.
Create a new N-Testing parameter binding
Select the N-Testing config file in the Project window and add a new item to the ConfigBindings list.
Update values of the new item as follows:
- N Testing Variable Name:
health_scaling(The name of the parameter created in Homa Lab) - Config Id:
enemy-balance(The config ID of theEnemyBalanceConfigobject) - Config Property Path:
HealthScalingFactor(The path to the config JSON property to modify)
Tip
Config Property Path is optional.
After updating the values, click the "Apply" button.

Update Config in runtime
With the N-Testing parameter and N-Testing Config set up, the HealthScalingFactor property of the EnemyBalanceConfig object can receive runtime updates.
You can use the UpdateAvailable event and UpdateConfig() method to update the config object when a new version is available.
configHandle.UpdateAvailable += () =>
{
configHandle.UpdateConfig();
};
Tip
Pay attention to when you update your Configs. Updating the Config mid-level can lead to unwanted inconsistencies.
You can check if Config in the Config handle is outdated with IsUpToDate property. Note that config handles are always up to date immediately after calling GetHandle<T>().
var configHandle = Config.GetHandle<EnemyBalanceConfig>();
Debug.Log($"Config is up to date: {configHandle.IsUpToDate}");
Summary
In this tutorial, you learned how to set up your project with N-Testing parameters to modify the runtime data of a config object.