Skip to main content

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​

Supports Android, iOS, Windows platform.
note

MSDK currently does not support Windows.

Function Definition​

T GetConfig<T>(string key, T defValue, string project = "INTL")

Input Parameters​

ParameterTypeDescription
keybool, int, stringConfiguration key
defValuebool, int, stringThe return value after failure, not mandatory
projectstringDefault parameter, keep unchanged

Code Sample​

UnionAdapterAPI.GetToolsService().GetConfig<string>("key");