Get all key-value values in the bcore_config.json file and customized the key-value values in the configuration module.
If the key values in the configuration module conflicts with the bcore_config.json file, the value in the configuration module shall prevail.
Interface invoke:
//获取yz_game_id,其他值获取方式与此类似
Dictionary<string, object> configDic = new Dictionary<string, object>();
configDic.Add(SuperSDKConfig.KEY, SuperSDKConfig.KEY_YZ_GAME_ID);
Debug.Log("SuperSDK yz_game_id:" + SuperSDK.getInstance().InvokeString(SuperSDKConfig.MODULE_NAME, SuperSDKConfig.FUNC_GET_VALUE, configDic));
Result printing:
SuperSDK yz_game_id:94
Custom extended parameters
– Get the custom parameter 1 Interface invoke:
Dictionary<string, object> configDic = new Dictionary<string, object>();
configDic.Add(SuperSDKConfig.KEY, SuperSDKConfig.KEY_EXTEND);
Debug.Log("SuperSDK config自身测试参数:" + SuperSDK.getInstance().InvokeString(SuperSDKConfig.MODULE_NAME, SuperSDKConfig.FUNC_GET_VALUE, configDic));
Result printing:
SuperSDK config自身测试参数:自定义参数一
–Get the custom parameter 2 interface invoke:
Dictionary<string, object> configDic = new Dictionary<string, object>();
configDic.Add(SuperSDKConfig.KEY, SuperSDKConfig.KEY_EXT2);
Debug.Log("SuperSDK config自身测试参数:" + SuperSDK.getInstance().InvokeString(SuperSDKConfig.MODULE_NAME, SuperSDKConfig.FUNC_GET_VALUE, configDic));
Result printing:
SuperSDK config自身测试参数:自定义参数二
–Get the custom parameter 3 interface invoke:
Dictionary<string, object> configDic = new Dictionary<string, object>();
configDic.Add(SuperSDKConfig.KEY, SuperSDKConfig.KEY_EXT3);
Debug.Log("SuperSDK config自身测试参数:" + SuperSDK.getInstance().InvokeString(SuperSDKConfig.MODULE_NAME, SuperSDKConfig.FUNC_GET_VALUE, configDic));
Result printing:
SuperSDK config自身测试参数:自定义参数三
–Get the custom parameter 4 interface invoke:
Dictionary<string, object> configDic = new Dictionary<string, object>();
configDic.Add(SuperSDKConfig.KEY, SuperSDKConfig.KEY_EXT4);
Debug.Log("SuperSDK config自身测试参数:" + SuperSDK.getInstance().InvokeString(SuperSDKConfig.MODULE_NAME, SuperSDKConfig.FUNC_GET_VALUE, configDic));
Result printing:
SuperSDK config自身测试参数:自定义参数四
Constant string | Event string | Description |
---|---|---|
SuperSDKConfig.MODULE_NAME | config | Module name |
SuperSDKConfig.FUNC_GET_VALUE | getValue | The method of getting key-value under the configuration module |
SuperSDKConfig.KEY | key | Hold one of the following key values |
SuperSDKConfig.KEY_YZ_GAME_ID | yz_game_id | Youzu gameID, get the value of key=yz_game_id |
SuperSDKConfig.KEY_EXTEND | extend | Customize parameter 1, get the value of key=extend |
SuperSDKConfig.KEY_EXT2 | extend2 | Custom parameter 2, get the value of key=extend2 |
SuperSDKConfig.KEY_EXT3 | extend3 | Custom parameter 3, get the value of key=extend3 |
SuperSDKConfig.KEY_EXT4 | extend4 | Custom parameter 4, get the value of key=extend4 |