INTLConfig Configuration
Dynamic Configuration Retrieval (GetConfig)
[Player Network SDK] Dynamic retrieval of configuration values
Supported Platforms
Android, iOS, and Windows platforms are supported.
Function Definition
- Unity
- Unreal Engine
T GetConfig<T>(string key, T defValue, string project = "INTL")
static std::string GetConfig(const std::string &key, const std::string &default_value, const std::string &project = "INTL");
Parameter Explanation
- Unity
- Unreal Engine
| Parameters | Type | Description |
|---|---|---|
| key | bool, int, string | Key for the configuration |
| defValue | bool, int, string | Return value if retrieval fails, not mandatory |
| project | String | Default parameter, remains unchanged |
| Parameters | typology | Explanation |
|---|---|---|
| key | std::string | Key for the configuration |
| default_value | std::string | Return value if retrieval fails, not mandatory |
| project | std::string | Default parameter, remains unchanged |
Code sample
- Unity
- Unreal Engine
int gameID = INTLAPI.GetConfig(GAME_ID_KEY, 0);
LILanguage = UINTLSDKAPI::GetConfig(GAME_ID_KEY, 0);
Dynamic Configuration Update (UpdateConfig)
[Player Network SDK] Dynamically update configuration.
Supported Platforms
Android, iOS, and Windows platforms are supported.
Function Definition
- Unity
- Unreal Engine
bool UpdateConfig(Dictionary<string, string> configsDic, string project = "")
static bool UpdateConfig(const std::map<std::string, std::string> &config, const std::string &project = "");
Input Parameters
- Unity
- Unreal Engine
| Parameter | Type | Description |
|---|---|---|
| configsDic | Dictionary<string, string> | Configuration content |
| project | string | Default parameter, remains unchanged |
| Parameters | Type | Explanation |
|---|---|---|
| config | std::map<std::string, std::string> | Configuration content |
| project | std::string | Default parameter, remains unchanged |
Code Sample
- Unity
- Unreal Engine
Dictionary<string, string> config = new Dictionary<string, string>();
config.Add("LOG_LEVEL", "1");
INTLAPI.UpdateConfigs(config);
std::map<std::string, std::string> config;
config.Add("LOG_LEVEL", "1");
UINTLSDKAPI::UpdateConfig(config);
Remote Configuration
The cloud control configuration in the Player Network Console will be automatically pulled after SDK initialization and successful login, and can also be set to pull at fixed intervals through configuration. See Player Network SDK Remote Config.