# CheckSupport
static void CheckSupport(const FString& UserInfo, bool TestEnv, std::function<void (int Result, const FString& Message)> OnResult);
接口描述
用于判断当前机型或者微信版本是否支持一键开播能力,可作为是否显示直播入口的依据。调用结果会通过回调通知给游戏。
输入参数
| 参数 | 类型 | 含义 |
|---|---|---|
| UserInfo | FString | 用户信息 |
| TestEnv | bool | 游戏包类型 测试包:true,现网包:false |
| OnResult | std::function<void (int Result, const FString& Message)> | checkSupport回调函数 |
userInfo格式说明:
//userInfo为json字符串
userInfo = "{\"openid\":string,\"appid\":string,\"area_id\":number,\"plat_id\":number,\"partition_id\":number,\"role_id\":string,"\"renderer\":string}"
其中:
openid: 必填字段,为用户登录后拿到的用户id,
appid: ;微信开放平台注册的appid,格式为:wx...
area_id(游戏大区id), plat_id(游戏区服id), role_id(游戏内角色id)字段选填
renderer 必填字段, gpu型号, 填 SystemInfo.graphicsDeviceName
3.使用示例
UWXGameLiveEngine::CheckSupport(UserInfo, TestEnv, [=](int result, const FString& message)
{
//处理回调结果
});