GetConfig
[Player Network SDK & MSDK] Dynamically obtains configuration values. If the value of a key is not successfully set by calling GUAUpdateConfig, the configuration in the .ini file will be returned. Otherwise, the value that is set dynamically will be returned.
Supported Platform
- Unity
- Unreal Engine
Supports
Android, iOS, Windows platform.Supports
Android, iOS, Windows platform.note
MSDK currently does not support Windows.
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");
Input Parameters
- Unity
- Unreal Engine
| Parameter | Type | Description |
|---|---|---|
| key | bool, int, string | Configuration key |
| defValue | bool, int, string | The return value after failure, not mandatory |
| project | string | Default parameter, keep unchanged |
| Parameter | Type | Description |
|---|---|---|
| key | std::string | Configuration key |
| default_value | std::string | The return value after failure, not mandatory |
| project | std::string | Default parameter, keep unchanged |
Code Sample
- Unity
- Unreal Engine
UnionAdapterAPI.GetToolsService().GetConfig<string>("key");
GUA_NAMESPACE::GUAToolsService::GetConfig("key");